f



Mailing Attachments

I've got an app which creates one or more output files. The users want
to e-mail the files once the export is complete. The output file names
and locations are not fixed.

They want to choose the recipient from their Outlook address book and
then type in a message before the message is sent.

My first idea was to use mailto and crank up a blank message with the
files already attached, but the protocol doesn't support attachments
from what I've been able to tell.

I guess could build my own message entry screen, then use MAPI to send
the message with the attachments, but that seems like I'm reinventing
the wheel.

Maybe I could script something in Outlook, but getting an app
installed and working on all their variations of Outlook and Outlook
Express isn't too appealing either.

What simple solution am I missing?
0
9/1/2004 8:44:06 PM
comp.lang.basic.visual.misc 10153 articles. 0 followers. Post Follow

3 Replies
603 Views

Similar Articles

[PageSpeed] 24

kenwebster@carolina.rr.com (Ken Webster) wrote:

>I've got an app which creates one or more output files. The users want
>to e-mail the files once the export is complete. The output file names
>and locations are not fixed.
>
>They want to choose the recipient from their Outlook address book and
>then type in a message before the message is sent.
>
>My first idea was to use mailto and crank up a blank message with the
>files already attached, but the protocol doesn't support attachments
>from what I've been able to tell.
>
>I guess could build my own message entry screen, then use MAPI to send
>the message with the attachments, but that seems like I'm reinventing
>the wheel.
>
>Maybe I could script something in Outlook, but getting an app
>installed and working on all their variations of Outlook and Outlook
>Express isn't too appealing either.
>
>What simple solution am I missing?

Create your own outgoing mail app with an SMTP control, such as the free one
from www.ostrosoft.com.

More about me: http://www.jecarter.com/
VB3/VB6/C/PowerBasic source code: http://www.jecarter.com/programs.html
Freeware for the Palm with NS Basic source code: http://nsb.jecarter.com
Drivers for Pablo graphics tablet and JamCam cameras: http://home.earthlink.net/~mwbt/
Email here: http://www.jecarter.com/contactme.htm
0
look4195 (109)
9/1/2004 9:58:10 PM
"Ken Webster" <kenwebster@carolina.rr.com> wrote in message
news:f45c15a4.0409011244.2b899929@posting.google.com...
> I've got an app which creates one or more output files. The users want
> to e-mail the files once the export is complete. The output file names
> and locations are not fixed.
>
> They want to choose the recipient from their Outlook address book and
> then type in a message before the message is sent.
>
> My first idea was to use mailto and crank up a blank message with the
> files already attached, but the protocol doesn't support attachments
> from what I've been able to tell.
>
> I guess could build my own message entry screen, then use MAPI to send
> the message with the attachments, but that seems like I'm reinventing
> the wheel.
>
> Maybe I could script something in Outlook, but getting an app
> installed and working on all their variations of Outlook and Outlook
> Express isn't too appealing either.
>
> What simple solution am I missing?

You can use MAPI to bring up a message entry window too, at least with
Outlook and OE.  You pass a flag... I think it's MAPI_DIALOG to
MAPISendMail().  This actually causes it to bring up a normal email window.

Using the MAPI classes available on my site
(http://www.constantthought.com/file10/ I think), it's as simple as:

Dim Message As New CEmailMessage
Message.ShowDialog = True ' Turns on the message window
Message.AddAttachment "<Filename 1>"
Message.AddAttachment "<Filename 2>"
Message.SendMail

If there isn't a default MAPI client set up, you may also want to do a
Message.Logon "" which should display the MAPI logon dialog.

Hope that helps.

Murphy
www.ConstantThought.com


0
MurphyAt (87)
9/1/2004 11:05:19 PM
kenwebster@carolina.rr.com (Ken Webster)'s wild thoughts
were released on 1 Sep 2004 13:44:06 -0700 bearing the
following fruit:

>I've got an app which creates one or more output files. The users want
>to e-mail the files once the export is complete. The output file names
>and locations are not fixed.
>
>They want to choose the recipient from their Outlook address book and
>then type in a message before the message is sent.
>
>My first idea was to use mailto and crank up a blank message with the
>files already attached, but the protocol doesn't support attachments
>from what I've been able to tell.
>
>I guess could build my own message entry screen, then use MAPI to send
>the message with the attachments, but that seems like I'm reinventing
>the wheel.
>
>Maybe I could script something in Outlook, but getting an app
>installed and working on all their variations of Outlook and Outlook
>Express isn't too appealing either.
>
>What simple solution am I missing?

If I understand you, you want to open a blank email with
files already attached?

If so you can achieve this with the MAPI controls very
easily.





Jan Hyde (VB MVP)

-- 
I bought a no-stick frying pan, which is superflous as I do not eat sticks anyway. 

(Jimmy Snibbler) 

[Abolish the TV License - http://www.tvlicensing.biz/]

0
9/2/2004 7:57:39 AM
Reply: