AndrewMozley
Programmer
There is a VFP application that creates an Outlook object, intending to send an email. The broad sequence of instructions is :
#DEFINE MAILITEM 0
oOutlook = CreateObject(“Outlook.application”)
. . .
oEmailitem = oOutlook.CreateItem(MAILITEM)
. . .
oRecipients = oEmailItem.Recipients
. . .
On a workstation with Outlook configured and running, this works fine. On a workstation which does not have Outlook properly configured, the CreateObject() instruction sometimes fires up the Outlook installation processs, and sometimes it just continues until it fails at the oRecipients instruction.
I would like to detect this situation and warn the user before trying to create an email. To that end the program is checking the values of TYPE(‘oOutlook’) and Type(‘ oEmailitem’).
But they are returning ‘O’ (Object), even though the oRecipients instruction subsequently fails.
How can I test that Outlook is properly configured so that I can warn the user if it is not.
Thank you.
#DEFINE MAILITEM 0
oOutlook = CreateObject(“Outlook.application”)
. . .
oEmailitem = oOutlook.CreateItem(MAILITEM)
. . .
oRecipients = oEmailItem.Recipients
. . .
On a workstation with Outlook configured and running, this works fine. On a workstation which does not have Outlook properly configured, the CreateObject() instruction sometimes fires up the Outlook installation processs, and sometimes it just continues until it fails at the oRecipients instruction.
I would like to detect this situation and warn the user before trying to create an email. To that end the program is checking the values of TYPE(‘oOutlook’) and Type(‘ oEmailitem’).
But they are returning ‘O’ (Object), even though the oRecipients instruction subsequently fails.
How can I test that Outlook is properly configured so that I can warn the user if it is not.
Thank you.