The message is coming from Excel, not Word... try this:
oXL.DisplayAlerts = False
'your code here...
oXL.DisplayAlerts = True
--
Regards,
Juan Pablo González
"will lam" wrote in message
...
hi,
i got a VBA prog. to open excel. but, when the prog. open excel
spreadsheet, there is an error. "Can't open pivot table soubrce file..." so,
i tried to supress the error message via the code. but,
VB stops at the
Open() statement, and wait for me to respond to the message before it
continues. and, i really want
VB ignores the error, and continues.
Application.DisplayAlerts = wdAlertsNone
TempFileString = sfilePath & "\" & TempFileString
Set owb = oXL.Workbooks.Open(FileName:=TempFileString,
UpdateLinks:=False, ReadOnly:=False, ignoreReadOnlyRecommended:=True)
Application.DisplayAlerts = wdAlertsAll
does anyone has any idea on how to resolve this problem?
thank a lot,
will :O)