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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Outlook Automation

Status
Not open for further replies.

jollymon

Programmer
Nov 6, 2003
5
0
0
US
I have sucessfully implemented a level of outlook automation thanks to the incredbile information provided by this forum. THANKS!!!

One issue that I do have though, is that the application needs to be able to define when the user has outlook installed and configured correctly prior to calling the outlook integration routines. What I am getting is a wizard to help the user finish the outlook setup.

What I need is to be able to define whether or not outlook is properly installed prior to doing the calls.

By the way, the outlook object does initialize; I was thinking that maybe it does not and a call to the TYPE of the object would return undefined.

Thanks....

Andrew
 
Hi

YOu have to trap it using ON ERROR routine

For example..


** get the current ON ERROR
lcmdError = ON("ERROR")

** Set the new ON ERROR
ON ERROR DO ErrorNoOutLook
oOutLook = CREATEOBJECT(OutLook.APplication)
IF !EMPTY(lcmdError)
ON ERROR DO &lCmdError
ELSE
ON ERROR
ENDIF

Now.. in the ErrorNoOutLook procedure, ask for installation of outlook or whatever.. and then return to your main.prg or calling prg.. whatever.

:)

____________________________________________
ramani - (Subramanian.G) :)
When you ask VFP questions, please add VFP version.
 
Ramani:
Thanks for the reply. This does not work though as the object is initialized with no problem.

Your code does raise an error exception; it needs quotes around OUTLOOK.APPLICATION. I thought at first that it worked but removing the error routine quickly pointed out that the error exception was that the var OUTLOOK.APPLICATION did not exists. Adding quotes made the code run fine with no error on a machine that does not have a profile set up for outlook.

Thanks!

Andrew
 
Ramani,

A different turn to the topic.

I tried MAPI in my applications. Most interesting part of it is that it gets connected to whatever email system specified in individual user's machine, be it Outlook, Incredimail or LotusNotes whatever...

Whereas if we specify Outlook in the application, it works only for Outlook.

Do you agree that MAPI is a flexible or there are any tangible benefits of using Outlook as a built-in?

Puru
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top