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

Outlook: My.exe as a COM object 2

Status
Not open for further replies.

pt777

Technical User
Mar 27, 2004
62
US
I've done a fair amount of COM automation using Outlook objects and thought it would be more savy to use my.exe (VFP-8) as a COM object in OUTLOOK. (i.e., to place My.exe within a Contact Form and/or Appointment Form.

FoxAdvisor's April 04 issue discussed a VFP 'exe' as it was used as a COM object (in Excel).

Thanks in advance for any tentative feedback in this matter.

Philip
 
I think you'd be best off saving functions that perform specific tasks in a dll and calling them as needed... but that all depends on what you're trying to do!

Check out faq184-4964 Protect your apps/functions with a dll for an example of a functional dll build. Your fuctions would have to be more sophisticated.

Of course, the VBA call syntax would be different too...

Another way to go would be to embed Outlook within a VFP skip with buttons/menus as demonstrated in faq184-3808 A sample form for outlook email handling.


Brian
 
pt777


Was there a particular question you had?

Mike Gagnon

If you want to get the best response to a question, please check out FAQ184-2483 first.
 
Brian, Mike already helped me beyond Ramani's scheme (which is also a goody-class in VFP-8); he also helped me tackle some intense XML parsing to help with programming Outlook Inspectors, and numerous other script and COM (importing) commands. (... to which I am not a little comforted and grateful)

I realize that to embed a my.exe (or my.dll) into Outlook may ultimately be difficult (I don't know). It is EASY to embed custom controls like EXCEL (OFFICE SPREADSHEET 10 CONTROL) and WINDOWS MEDIA PLAYER, into OUTLOOK by right clicking on the control box while designing a form. Now I'm merely asking:

Can we as easily embed a VFP-8 My.exe (or My.dll) as a CUSTOM CONTROL into Outlook?

Thanks (again) in advance,
Philip
 

I realize that to embed a my.exe (or my.dll) into Outlook may ultimately be difficult (I don't know). It is EASY to embed custom controls like EXCEL (OFFICE SPREADSHEET 10 CONTROL) and WINDOWS MEDIA PLAYER, into OUTLOOK by right clicking on the control box while designing a form. Now I'm merely asking:
Can we as easily embed a VFP-8 My.exe (or My.dll) as a CUSTOM CONTROL into Outlook?


I'm sorry I have never attempted this. I'm not sure how to call your dll from Outlook either. But since your question relates more towards Outlook rather than VFP you may want to try asking your question in forum605.


Mike Gagnon

If you want to get the best response to a question, please check out FAQ184-2483 first.
 
Hi Philip.

>> Can we as easily embed a VFP-8 My.exe (or My.dll) as a CUSTOM CONTROL into Outlook? <<

I don't know how easy this is because I have never tried it ;-) But you may want to do a search in the MSDN library on "com add-ins" and see what you come up with.

As far as I know, this is possible. I just do not know how easy it is.




Marcia G. Akins
 
>> Can we as easily embed a VFP-8 My.exe (or My.dll) as a CUSTOM CONTROL into Outlook? <<

VFP can't make ActiveX "controls", just ActiveX Automation Servers.

So, you can't make a control and set it on a form in Outlook.

But in VBA for Outlook, you can " SET oX = CreateObject('myVfpExe.MyVfpClass')" then manipulate oX.
 
below works - just set up a button on toolbar and create macro:

Sub TimeEntry()

Dim retval
retval = Shell("c:\yourpath\yourexe.EXE", 1)
'MyAppID = Shell("c:\yourpath\yourexe.EXE", 1) ' Run
'AppActivate MyAppID '

End Sub

 
Looks like awesome VB script (albeit a year has passed). I'll test and get back if necessary.

Thanks,

Philip
 
That is what is so great about Tek-tips - your questions are available for others. We just started working with adding stuff to Outlook and while searching for ideas I came across your post. Hope it helps.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top