I would like to generate and save filenames in a unique way something like:
Prefix_datetimestamp. Can I do this be recording a macro or would VBA be
necessary? Would really appreciate a pointer in the right direction.

Thanks,
Trouvera

P.S. I will be doing this in Word and Excel.

Re: Macro/VBA to generate and save filenames by Jezebel

Jezebel
Mon Oct 30 18:05:53 CST 2006

All macros are VBA, whether you write them or record them. But you can't do
what you describe using the macro recorder.

Dim pFileName as string

pFileName = "Prefix_" & format$(Now, "yyyymmdd")
ActiveDocument.SaveAs FileName:=pFileName





"Trouvera52" <Trouvera52@discussions.microsoft.com> wrote in message
news:CE8821A8-9671-438B-B8A1-4D04377B08D3@microsoft.com...
>I would like to generate and save filenames in a unique way something like:
> Prefix_datetimestamp. Can I do this be recording a macro or would VBA be
> necessary? Would really appreciate a pointer in the right direction.
>
> Thanks,
> Trouvera
>
> P.S. I will be doing this in Word and Excel.



Re: Macro/VBA to generate and save filenames by Trouvera52

Trouvera52
Tue Oct 31 11:14:02 CST 2006

Thank you Jezebel.

"Jezebel" wrote:

> All macros are VBA, whether you write them or record them. But you can't do
> what you describe using the macro recorder.
>
> Dim pFileName as string
>
> pFileName = "Prefix_" & format$(Now, "yyyymmdd")
> ActiveDocument.SaveAs FileName:=pFileName
>
>
>
>
>
> "Trouvera52" <Trouvera52@discussions.microsoft.com> wrote in message
> news:CE8821A8-9671-438B-B8A1-4D04377B08D3@microsoft.com...
> >I would like to generate and save filenames in a unique way something like:
> > Prefix_datetimestamp. Can I do this be recording a macro or would VBA be
> > necessary? Would really appreciate a pointer in the right direction.
> >
> > Thanks,
> > Trouvera
> >
> > P.S. I will be doing this in Word and Excel.
>
>
>