'If wdDoc Is Nothing Then wdApp.Documents.Open (strDocName) 'this line is unnecessary in Word ' wdDoc.Activate 'as is this the following line ' Set orng = ActiveDocument.Range ' should be Set orng = wdDoc.Range
'If wdDoc Is Nothing Then wdApp.Documents.Open (strDocName) 'this line is unnecessary in Word ' wdDoc.Activate 'as is this the following line ' Set orng = ActiveDocument.Range ' should be Set orng = wdDoc.Range
Last edited by Aussiebear; 03-06-2025 at 04:11 AM.
Graham Mayor - MS MVP (Word) 2002-2019
Visit my web site for more programming tips and ready made processes
http://www.gmayor.com