Saving a file, if it has a specific name

K

kassie

Hi

I have created a Word document, which I use as a template. Iow, it is a
..doc file, but I open it, save it as some other name, and then work with it.
The application is to have a letterhead, or a fax covering letter available,
which I open, svae as, and then type a letter or covering letter.

Can someone help me with a macro to do this? The part that has me stumped,
is to check if the file has already been saved.
If I open LetHead.doc, for example, I want the macro to check the filename.
If it is in fact LetHead.doc, I want to use an inputbox to get a filename.
However, if I open a file, let's say called Letter to SARS.doc, then the
macro should not execute. To do this in Excel is real easy, but I cannot get
it to read the current filename?
 
H

Helmut Weber

Hi Kassie,

activedocument.name returns the name
activedocument.fullname returns the path and the name
activedocument.saved returns whether
is was saved after the last change.

--
Greetings from Bavaria, Germany

Helmut Weber, MVP WordVBA

Win XP, Office 2003
"red.sys" & Chr$(64) & "t-online.de"
 
K

kassie

Thanks Helmut, and there I was trying things like "filename". You were a
great help!

Regards

Kassie Kasselman
Change xxx to hotmail
 

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