msvisual.com Forum Index
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

OLE and Outlook

 
Post new topic   Reply to topic    msvisual.com Forum Index -> OLE
Author Message
DRIESSEN Michel



Joined: 04 Oct 2007
Posts: 2

PostPosted: Mon Oct 18, 2004 11:32 am    Post subject: OLE and Outlook Reply with quote

Hello,

I have a question concerning linking a software with Outlook through OLE.

I tried to run a macro, defined in Outlook, but it doesn't seem to be that
easy.

If I use Word through OLE, it is very easy to start a macro from my software
in Word.

I use this code :

hWordOle := CreateOleObject("Word.Application")
OleSetProperty(hWordOle,"Visible",.T.)
OleInvoke(hWordOle ,"Run" ,"JUD_OPSL")

"JUD_OPSL" is the name of the macro which has to be run in Word.

I tried to use the same kind of code for Outlook :

hOutlOle := CreateOleObject("Outlook.Application")
OleSetProperty(hOutlOle,"Visible",.T.)
OleInvoke(hOutlOle ,"Run" ,"OUTL_MACRO")

The Outlook object is being created (I can see the icon in my system tray).
But why is the macro "OUTL_MACRO" NOT being excecuted ?

How can a macro being run from another software ?

Thanks a lot in advance for any help.

Regards,

Michel D.
Genk (Belgium)

Archived from group: microsoft>public>vb>ole
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    msvisual.com Forum Index -> OLE All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group