Attach file to Outlook 
Author Message
 Attach file to Outlook

Dear Anyone
      I get a error from my program. I worte a program for the users to use.
The program can send the report by the mail. I don't how to write the code
for attach file for outlook, outlook express.

I try to write that
      oform.addobject("Session1","olecontrol","MSMAPI.mapisession")
      oform.addobject("Message1","olecontrol","MSMAPI.mapimessages")

      oform.Session1.signon

       oform.Message1.sessionid =  form.session1.sessionid
       oform.Message1.compose
       mfile = 'c:\name.pdf'
       oform.message1.AttachmentPathName =  mfile

Thanks you ....



Tue, 30 Aug 2005 16:24:03 GMT  
 Attach file to Outlook
Hello, JJ!
You wrote  on Fri, 14 Mar 2003 16:24:03 +0800:

 J> I try to write that
 J>       oform.addobject("Session1","olecontrol","MSMAPI.mapisession")
 J>       oform.addobject("Message1","olecontrol","MSMAPI.mapimessages")

 J>       oform.Session1.signon

 J>        oform.Message1.sessionid =  form.session1.sessionid
 J>        oform.Message1.compose
 J>        mfile = 'c:\name.pdf'
 J>        oform.message1.AttachmentPathName =  mfile

 J> Thanks you ....

Here's some sample code that you can modify:

FOR lncount = 1 TO lnfilecount
    lomessage.attachmentindex = lncount - 1
    lomessage.attachmentpathname = lafiles[lnCount]
    lomessage.attachmentposition = lncount - 1
ENDFOR
---
Eric den Doop
www.foxite.com - The Home Of The Visual FoxPro Experts - Powered By VFP8



Tue, 30 Aug 2005 17:10:13 GMT  
 Attach file to Outlook
Hi JJ:

Take a look at this article.  If you add more than one attachment, you may
get and error unless you use the proper technique:

181899 PRB: Multiple E-mail Attachments Cause Error with MSMAPI OCX
http://support.microsoft.com/?id=181899

I hope this helps.

This posting is provided "AS IS" with no warranties, and confers no rights.

Sincerely,
Microsoft FoxPro Technical Support
Lee Mitchell

Quote:
>Dear Anyone
>      I get a error from my program. I worte a program for the users to
use.
>The program can send the report by the mail. I don't how to write the code
>for attach file for outlook, outlook express.
>I try to write that
>      oform.addobject("Session1","olecontrol","MSMAPI.mapisession")
>      oform.addobject("Message1","olecontrol","MSMAPI.mapimessages")

>      oform.Session1.signon

 >      oform.Message1.sessionid =  form.session1.sessionid
Quote:
>       oform.Message1.compose

 >      mfile = 'c:\name.pdf'
 >      oform.message1.AttachmentPathName =  mfile
Quote:
>Thanks you ....



Wed, 31 Aug 2005 02:34:01 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. Attach File on OUTLOOK 2002

2. Attach file from OUTLOOK

3. Can I attach icon in Foxpro .exe file

4. Foxpro 2.5 Attaching files to records?

5. how to attach screen to renamed database file?

6. :Re: Foxpro 2.5 Attaching files to records?

7. vfp 6.0 Attach Icon-file to *.exe

8. Can I attach text file as table??

9. sample files attached

10. attaching icon to exe file

11. Attaching files to a Table

 

 
Powered by phpBB® Forum Software