Thread: [Solved] Acronym Finder
View Single Post
 
Old 09-22-2014, 10:03 PM
Cray_Z Cray_Z is offline Windows 7 32bit Office 2007
Novice
 
Join Date: Sep 2014
Posts: 16
Cray_Z is on a distinguished road
Default Acronym Finder

I would like to close out the DocSrc and the DocAcro when the macro has completed and just leave the newly created acronym list document open. I tried using the following:
DocAcro.Close Savechanges:=wdDoNotSaveChanges
DocSrc.Close Savechanges:=wdDoNotSaveChanges

But am not sure this is correct syntax. Can you shed some light on this for me?

I have revised my code to include:
With DocSrc
currDoc = .FullName
.Close SaveChanges:=wdDoNotSaveChanges
End With
With DocAcro
currDoc = .FullName
.Close SaveChanges:=wdDoNotSaveChanges
End With

And it appears to be working. Can you tell me if this is the proper (efficient) way to accomplish this?

Last edited by Cray_Z; 09-22-2014 at 10:30 PM. Reason: Revised code
Reply With Quote