A
Alan UK
I have a macro that I want to use to "refresh" the
document on the C drive with the updated version
maintained on the Network drive. As the documents contain
automacros I have used:
Sub Refresher()
WordBasic.DisableAutoMacros
Documents.Open FileName:="H:\test.doc", ReadOnly:=True
ActiveDocument.SaveAs "C:\My Documents\test.doc"
ActiveDocument.Close
End Sub
The only problem then is that the only way I have found to
re-activate the automacro is to quit the application-
which is not ideal as I would like the refresh to occur at
each Word application open, and I would be looping(!)
I cannot locate the equivalent of
"WordBasic.EnableAutoMacros" in terms of functionality.
Is there some coding I can use instead of quitting word,
or another method of disbling the automacro that also has
a reactivation code?
document on the C drive with the updated version
maintained on the Network drive. As the documents contain
automacros I have used:
Sub Refresher()
WordBasic.DisableAutoMacros
Documents.Open FileName:="H:\test.doc", ReadOnly:=True
ActiveDocument.SaveAs "C:\My Documents\test.doc"
ActiveDocument.Close
End Sub
The only problem then is that the only way I have found to
re-activate the automacro is to quit the application-
which is not ideal as I would like the refresh to occur at
each Word application open, and I would be looping(!)
I cannot locate the equivalent of
"WordBasic.EnableAutoMacros" in terms of functionality.
Is there some coding I can use instead of quitting word,
or another method of disbling the automacro that also has
a reactivation code?