Save As in word

vinimall

New member
Local time
Today, 16:00
Joined
May 30, 2003
Messages
2
Hi
I have a word document where on the On Close event I have the following code:

Code:
Sub SaveFilename()

Dim PathAndFileName As String, n As Long

PathAndFileName = Path & "\Letters\.doc"

If Dir(PathAndFileName & ".doc") = "" Then
    ActiveDocument.SaveAs (PathAndFileName & ".doc")
Else
    n = 1
    Do While Dir(PathAndFileName & n & ".doc") <> ""
        n = n + 1
    Loop
    ActiveDocument.SaveAs PathAndFileName & n & ".doc"
End If

End Sub

But it only works once and not everytime the document is closed. I would it like it work everytime the doc is closed is this possible?

I have a bookmark that inserts a piece of test when ithe doc is opened is there a way for me to use that text as the file name when it is saved?

Thanks for any help
 
being used to photoshop, i wish microsoft would use the ctrl+shift+s combo as the "save as" function... much easier that way.
 

Users who are viewing this thread

Back
Top Bottom