Can anyone help with Word VBA

change function to sub

You also have to declare strDocName globally before any procedures or use

Application.Documents(Application.ActiveDocument.Name).Close
 
Last edited:

Users who are viewing this thread

Back
Top Bottom