error in code

A

Andries

Hello,

In a magazine I found some codelines to have the filelocation shown on top of my screen. But I get an errormessage because somewhere in the ActiveDocument.SaveAs (shown bold and in red) somethings wrong. I can't find the error. Who can? I use Word XP, but that doesn't seem to be the reason to me.

Thanx,
Andries

-------------------------------------------------
CODE:

Sub AutoOpen()
FileSave
End Sub

Sub FileSave()
With ActiveDocument
.Save
.ActiveWindow.Caption = .Path & "\" & ..ActiveWindow.Document.Name
End With
End Sub

Sub FileSaveAs()
Dim strFilename As String

With Dialogs(wdDialogFileSaveAs)
If .Display Then
ActiveDocument.SaveAs .Name, .Format, .lackannot, .Password, _
.addtomru, .WritePassword, .recommendreadonly, ..embedfonts, _
.nativepictureformat, .formsdata, .saveasaoceletter
End If
End With
FileSave
End Sub
 

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