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

has anybody got any code for using TOutlookApplication?

Status
Not open for further replies.

BuilderSpec

Programmer
Dec 24, 2003
383
GB
Hi

I want to create an email within my application and have the program fill in the "send to", subject and body fields etc but then leave the user in Outlook Application staring at the email just created.

I know about the NMPOP3 and NMSMTP stuff but I need to use TOutlook .

I can find code on the net that shows me how to view the folders in outlook etc ! but I want some to create an email and "dump" me in Outlook afterwards ?

Regards

 
It's OK now.. sorted it ....

_NameSpaceDisp ns;
_MailItemDisp ml;

OutlookApplication1->Connect();
ns = OutlookApplication1->GetNamespace(WideString("MAPI"));
ml = OutlookApplication1->CreateItem(olMailItem);
ml.set_Subject(WideString("Subject"));
ml.set_To(WideString("To"));
ml.set_Body(WideString("Body"));
ml.Display(true);


.. in case you were wondering ! ! !
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top