> I suspect you are using ChangeFileOpenDirectory. Stop doing that, if
> possible. If you are opening an explicit file, there is no need to alter
[quoted text clipped - 13 lines]
> >them in a pulldown menu on my toolbar. How can I make my macros remain as I
> >have created them?
I went through all of my macros and did what was suggested, but they still do
not work. Here is an example of the macro that opens a document. My
question is, how does the macro know in what directory to look for the
document?
Documents.Open FileName:="""Invoice template.doc""",
ConfirmConversions:= _
False, ReadOnly:=False, AddToRecentFiles:=False,
PasswordDocument:="", _
PasswordTemplate:="", Revert:=False, WritePasswordDocument:="", _
WritePasswordTemplate:="", Format:=wdOpenFormatAuto, XMLTransform:=""
End Sub
> So, I would type in the macro:
>
[quoted text clipped - 22 lines]
> > >them in a pulldown menu on my toolbar. How can I make my macros remain as I
> > >have created them?
Graham Mayor - 22 Dec 2007 13:08 GMT
What you require (based on your earlier message) is presumably
Dim sPath As String
sPath = "Y:\Kathryn\INSTRUCT - Prosecution\"
Documents.Open FileName:=sPath & "Invoice template.doc"
ie include the path (here sPath) in the file open statement. Word always
retains the focus of the last used folder, so you need to include the path
in the open statement.
Also if as the filename suggests, this is a template, you may be better
saving it as a template and using file > new to open documents from it. eg
Dim sPath As String
sPath = Application.Options.DefaultFilePath(wdUserTemplatesPath) & "\"
Documents.Add Template:= _
sPath & "Invoice Template.dot", NewTemplate:=False

Signature
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
Graham Mayor - Word MVP
My web site www.gmayor.com
Word MVP web site http://word.mvps.org
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
> I went through all of my macros and did what was suggested, but they
> still do not work. Here is an example of the macro that opens a
[quoted text clipped - 41 lines]
>>> Message posted via OfficeKB.com
>>> http://www.officekb.com/Uwe/Forums.aspx/word-programming/200712/1