General information
Category:
COM/DCOM and OLE Automation
Title:
Word XP (but not Excel) Automation Trouble
Good morning everyone,
Following is a small set of examples that I have been using for base programs since VFP 5...now using VFP 6x. The problem seems to have arisen after upgrading to Office Xp, BUT ONLY in Word (not Excel, Outlook, Project etc.....)
The code looks like this..
Example 1: (Always Fails)
Local vWord
vWord=CREATEOBJECT("Word.Application")
vWord.Documents.Open(ALLT('e:\vfp\quote\additional.doc'))
vWord.Visible=.T.
Release vWord
Example 2: (Always Works)
Local vExcel
vExcel=CREATEOBJECT("Excel.Application")
vExcel.Worksheet.Open(ALLT('e:\vfp\quote\duh.xls'))
vExcel.Visible=.T.
Release vExcel
Example 3: (Always Works)
ExcelFile='e:\vfp\quote\duh.xls'
ExcelApp = CREATEOBJECT("Excel.Application")
ExcelApp.Workbooks.ADD
ExcelApp.Workbooks.OPEN(ExcelFile)
*!* vWorksheetCount = ExcelApp.Worksheets.COUNT
ExcelApp.Visible=.T.
Release ExcelApp
The error generated is in the first example and the erros is:
OLD Error Code 0x800x70005 Access is Denied
This does not happen on clients non-XP computers....any thoughts or messages.
Thanks
Bryan Holmstrom
conduitsoft, Inc.
'The company that actually does that !'
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only