Print Page | Close Window

ShellExecute mailto: with Outlook 2003

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: General Discussion
Forum Description: Topics Related to Active-X COM Development in General
URL: http://forum.codejock.com/forum_posts.asp?TID=1739
Printed Date: 28 November 2024 at 12:21am
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: ShellExecute mailto: with Outlook 2003
Posted By: RDOlivaw
Subject: ShellExecute mailto: with Outlook 2003
Date Posted: 02 February 2005 at 11:23am

I'm using ShellExecute to pass a mailto: command line to the default mail client on user's PCs (in this case Outlook). The code line sent for Outlook 2000 is:

mailto:User@mymailserver.com?Subject=Medical - MailTo:User@mymailserver.com?Subject=Medical QualificationWaiver Consults statistics &body=Report for December 2004:  &file="C:\MedAccess\Dec20042SIF5.pdf"

where the &file= string is a file to be attached to the messge. On PCs using Outlook 2003, however, an error indicating a bad switch is returned and Outlook won't open. Removing the " marks from the filename in the &file= string allows Outlook to open with no error, however the file is not attached to the message automatically, as it is with Outlook 2000.

Anyone have any hints on how the command line has changed from 2000 to 2003?

Thanks.



-------------
RDO



Replies:
Posted By: divyesh
Date Posted: 15 February 2007 at 12:41am
First of all this code is also not working with outlook 2000.
and the code Replace to use for 2002 and above is:
&attachments in place of &file
 



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.04 - http://www.webwizforums.com
Copyright ©2001-2021 Web Wiz Ltd. - https://www.webwiz.net