save as

D

Daren White

I have a form which has a macro to save as filename. I want to include in the
filename the current time which brings up the error invalid file name. I
assume it is because of the : in the time value. Is there any way of
converting this?
 
G

Graham Mayor

Daren said:
I have a form which has a macro to save as filename. I want to
include in the filename the current time which brings up the error
invalid file name. I assume it is because of the : in the time value.
Is there any way of converting this?

Lose the colon eg
ActiveDocument.SaveAs "Name " & Format(Time, "HHMM") & ".doc"

--
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
Graham Mayor - Word MVP


<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top