Acronym Finder
I had those lines so it looked like: DocAcro.Close Savechanges:=wdDoNotSaveChanges
DocSrc.Close Savechanges:=wdDoNotSaveChanges
Set oTbl = Nothing: Set DocAcro = Nothing: Set DocSrc = Nothing: Set DocTgt = Nothing
And I also tried:
DocAcro.Close False: DocSrc.Close False (I tried True as well)
Set oTbl = Nothing: Set DocAcro = Nothing: Set DocSrc = Nothing: Set DocTgt = Nothing
But for some reason it leaves one or both of the documents open and I am unable to close them out with the X in the upper right hand corner. I end up going to the task bar and right clicking the Word icon and then clicking "close all windows." Only then do the windows close properly.
I am using the code:
With DocSrc
currDoc = .FullName
.Close SaveChanges:=wdDoNotSaveChanges
End With
With DocAcro
currDoc = .FullName
.Close SaveChanges:=wdDoNotSaveChanges
End With
And it closes out both documents for me. Just wondering if you have any idea why the two sample codes above do not work and yet the last one works? I prefer to have the code as efficient as possible but don't understand why one works and one doesn't.
|