PDA

View Full Version : suppressing warnings / data connections in word



p.goh
08-24-2012, 04:14 AM
Hi there

I am opening word docs like so:

Set wdObjDest = GetObject(strWordDocDest)

If this word document is trying to connect to a datasource (for mail merge or what have you) then the code freezes until it brings up a warning message saying ''Microsoft Office Excel is waiting for another application to complete an OLE action".

How do I bypass any data connection and open up the document regardless of whether it is a valid data connection?

Many thanks

Peter

snb
08-24-2012, 04:41 AM
Remove the connection in the Word document.
If necessary you can establish the connection to the Word document in the VBA code in Excel.

p.goh
08-24-2012, 04:49 AM
I am processing multiple documents, so can't go into everyone manually and remove the data connection.

ta

snb
08-24-2012, 08:38 AM
You can do that in Word, using VBA.

p.goh
08-24-2012, 09:15 AM
Thank you. I will look to see how to remove this.