Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Outlook automation and application stability
Message
From
11/05/2005 12:26:49
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
COM/DCOM and OLE Automation
Title:
Outlook automation and application stability
Miscellaneous
Thread ID:
01012963
Message ID:
01012963
Views:
70
Greetings,

I have a routine that uses the following automation code to send out sales order confirmations.
loApp = CREATEOBJECT("Outlook.application")
IF TYPE("loApp") = "O"
  loEmailItem = loApp.CreateItem(0)    && MAILITEM
  loEmailItem.Recipients.Add(lcEmailAddress)
  loEmailItem.Subject = lcSubject
  loEmailItem.Body = lcMessageBody
  loEmailItem.display()
ENDIF
About 95% of the time everything works ok and the system does what it is supposed to. Unfortunately, far too often outlook seems to tie up the host application and the user has to end the VFP task and restart the application.

Is there anything I can add to my code to make it less brittle and give the VFP application more stability?

Thanks in advance!!

Greg
Next
Reply
Map
View

Click here to load this message in the networking platform