PowerBASIC Peer Support Forums
 

Go Back   PowerBASIC Peer Support Forums > User to user Discussions > Special Interest Groups > Programming Microsoft Office

Programming Microsoft Office User to user discussions about programming Microsoft Office applications.

Reply
 
Thread Tools Display Modes
  #1  
Old Apr 13th, 2012, 09:11 PM
S Stamp S Stamp is offline
Member
 
Join Date: Dec 2006
Location: New Jersey, USA
Posts: 192
creating and sending e-mail via Outlook

For your reference, here is a program I created for creating an e-mail and sending it through MS Outlook.

I derived this from the code at:
http://www.powerbasic.com/support/pb...hlight=Outlook

I enhanced it to support HTML-formatted e-mail, for that reason, also needed a different INC file for Outlook.

The program gives you the option of having Outlook automatically send e-mail without user interaction with the Outlook application, or the program can just create the e-mail in Outlook but the Outlook user still has to press the send button.

There is no error checking on the COM API interactions, so you would want to add error checks before putting this code into production program.

Note that in Outlook 2003 ( and, depending on security settings, in Outlook 2007 and 2010), Outlook presents a dialog box for user approval when it receives a COM API command to create an e-mail.
Attached Files
File Type: inc MSoutlook2003-scott-generated-dispatch-only.inc (181.0 KB, 23 views)
File Type: bas scott email program.bas (4.0 KB, 23 views)
File Type: inc Send email via MS outlook.inc (10.4 KB, 17 views)

Last edited by S Stamp; Apr 14th, 2012 at 03:09 PM. Reason: changed Send email via MS outlook.inc to use ANYCOM instead of GETCOM/NEWCOM
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 08:58 AM.


Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Copyright 1999-2011 PowerBASIC, Inc. All Rights Reserved.
Error in my_thread_global_end(): 1 threads didn't exit