home bbs files messages ]

Forums before death by AOL, social media and spammers... "We can't have nice things"

   comp.lang.visual.basic      MS Visual Basic discussions, NOT dot-net      10,840 messages   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]

   Message 9,392 of 10,840   
   Raoul Watson to schmendrick   
   Re: Email Attatchments   
   07 Apr 05 01:46:01   
   
   From: WatsonR@IntelligenCIA.com   
      
   "schmendrick"  wrote in message   
   news:jIS4e.12230$Fh4.10493@fe2.columbus.rr.com...   
   > Is there a way to open the default email client and attatch a file to it?   
   >   
   > I would like to send reports via email with the click of a button.   
   >   
   > Reports are generated in HTML, so sending them as attatchment or even   
   > inline would work   
   >   
   > Thanks!   
      
   Not sure if you are at home with MAPI. If you are, you can do stuff like   
   (if not send me an e-mail, I'll send you some code):   
      
   Me.MAPISendUpdate.RecipAddress = DYN_Clients![Internet Address] & ""   
   ' e.g. "SMTP:WatsonR@IntelligenCIA.com   
   Me.MAPISendUpdate.MsgSubject = "Monthly Report"   
   Me.MAPISendUpdate.MsgNoteText = "Some text"   
   Me.MAPISendUpdate.AttachmentIndex = 0    ' Attachments start with 0   
   Me.MAPISendUpdate.AttachmentName = "REPORT.HTM"   
   Me.MAPISendUpdate.AttachmentPathName = "C:\TEMP\REPORT.HTM"   
   Me.MAPISendUpdate.AttachmentType = mapData ' Data file (or BINARY file)!   
   Me.MAPISendUpdate.AttachmentPosition = MsgLen - 2   
   Me.MAPISendUpdate.AttachmentPathName = AddlAttachment   
   Me.MAPISendUpdate.ResolveName   
   Me.MAPISendUpdate.Send                 ' Dispatch the message!   
   DoEvents                ' Give MAPI Control/MS-Mail/Exchange   
   '                                a chance to complete background processing.   
      
   --- SoupGate-Win32 v1.05   
    * Origin: you cannot sedate... all the things you hate (1:229/2)   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]


(c) 1994,  bbs@darkrealms.ca