S
Steve
Hi
I am writing a .dot file that tries to open a .doc file saved with a VBA
generated name stored in a VBA created directory structure. If the file
exists, it opens. If not, a new file is created complete with headings,
tables, etc. Everything works well now with the exception that I need to
hard code the top level of folder so it can be moved to a different folder
structure without the need for me to hard code the new location.
sFilePath should pick up the directory of the .dot file rather than the
newly created Document1 (which, of course, has no path until saved). Is
there a way I can pick up the path of the .dot file?
sFilePath = "H:\Daily Operational Reports" ' ActiveDocument.Path does not
work
On Error Resume Next
sFilePath = sFilePath & "\" & Format(Date, "YYYY")
....
Steve
I am writing a .dot file that tries to open a .doc file saved with a VBA
generated name stored in a VBA created directory structure. If the file
exists, it opens. If not, a new file is created complete with headings,
tables, etc. Everything works well now with the exception that I need to
hard code the top level of folder so it can be moved to a different folder
structure without the need for me to hard code the new location.
sFilePath should pick up the directory of the .dot file rather than the
newly created Document1 (which, of course, has no path until saved). Is
there a way I can pick up the path of the .dot file?
sFilePath = "H:\Daily Operational Reports" ' ActiveDocument.Path does not
work
On Error Resume Next
sFilePath = sFilePath & "\" & Format(Date, "YYYY")
....
Steve