Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Windows 10 & Office Automation - Reliability Tips?
Message
From
10/12/2015 19:37:23
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
COM/DCOM and OLE Automation
Title:
Windows 10 & Office Automation - Reliability Tips?
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Windows 10
Network:
Windows 2008 Server
Database:
MS SQL Server
Application:
Desktop
Miscellaneous
Thread ID:
01628823
Message ID:
01628823
Views:
61
I'm maintaining an app that's been around for quite a few years. It does things like automating Word to fill in document fields, and automating Outlook to create an e-mail with recipients and attachments, ready for the user to review and send.

With versions of Windows prior to Win10, the existing code seems to work well. However, running the app under Win10 is raising 2 types of errors:

1. Word automation errors trying to set CurrentPrinter - "The RPC server is unavailable"

2. VFP C5 errors when filling in Bookmarks in Word automation

These happen with at least 2 different versions of Office: 2007 & 2016. Also, if the EXE is run in Win7 compatibility mode on Win10, the errors don't occur.

My concern is the automation-related code may not adhere to best practices. Does anyone know of any best practices documents for Office automation reliability? Or have any other hard-won words of wisdom?
Regards. Al

"Violence is the last refuge of the incompetent." -- Isaac Asimov
"Never let your sense of morals prevent you from doing what is right." -- Isaac Asimov

Neither a despot, nor a doormat, be

Every app wants to be a database app when it grows up
Reply
Map
View

Click here to load this message in the networking platform