View Single Post
 
Old 07-31-2018, 02:36 PM
macropod's Avatar
macropod macropod is offline Windows 7 64bit Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 22,467
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

Quote:
Originally Posted by Ken Leidner View Post
So I must still be doing something wrong. I expect its the outdoc.Activate and the orginialdoc.Activate statements, but I don't understand how to tell the code which document to look in or output the information into without them.
As shown in the code I posted, you refer to the documents by the variables assigned to them (i.e. Doc1, Doc2). So, instead of statements like:
orginialdoc.Activate
you would reference the same document via:
Code:
With orginialdoc
…
End With
You still have a lot of unnecessary Select activity going on, too... And you don't need to keep inserting:
Application.ScreenUpdating = False
Once is enough. Moreover, once you've got the code working, you can set the Visible property of any document you open to False, further reducing the scope for flickering.
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote