Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Automating Outlook as a server to VFP6 program

Status
Not open for further replies.

SteveBoard

Programmer
Nov 1, 2002
35
US
I'm using routines in a VFP procedure that involve Word and Outlook. The Word procedure goes fine. Excel works too. But Outlook gives me an error: RPC server not found. If Outlook is activated before the procedure starts, all works well.

The system is Windows ME. Running the same procedure on a Windows 98 machine, Outlook opens and executes as a server with no problem. This must be a difference in configuration, but what's the difference?

Incidentally, I've received a lot of help from the book "Microsoft Office Automation with Visual FoxPro" by Granor and Martin.
 
SteveBoard

I'm not sure ME would cause the problem. Can you post the code that causes the problem? Mike Gagnon

If you want to get the best response to a question, please check out FAQ184-2483 first
 
Pretty simple:

oOutlook = CreateObject("Outlook.Application")

This gives me the RPC server error.

 
SteveBoard

oOutlook = CreateObject("Outlook.Application")

I cannot test this (I don't have ME), but I may be that Outlook requires a reinstallation, there might be things not registered properly.
Mike Gagnon

If you want to get the best response to a question, please check out FAQ184-2483 first
 
Your RPC errors usually come from the protocols that Outlook is trying to use to talk to MS Exchange server. Are you using MS Exchange? If so, you might try changing the order of the protocols. Check out the Knowledge Base Article: Q163576 at for more information.
The protocol order will effect the speed in which Outlook connects to the server. If it is taking too long to find the correct protocol, it may not be connecting before your code is trying to utilize the application.

Hope this helps!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top