I want to add attachments to emails in outlook 
Author Message
 I want to add attachments to emails in outlook

  I want to add attachments to emails in outlook,
  when i run the vbs file, there is no error
  but it doesn't send the message and doc.

  Set OutlookApp = CreateObject("Outlook.Application")
  Set Mapi = OutlookApp.GetNameSpace("Mapi")
  Set List = OutlookApp.CreateItem(0)

  List.Subject = "Test"
  List.Body = "TwojaWiadomosc"
  List.Attachments.Add ("c:\test.txt")
  List.Send

  Set List = Nothing
  Set Mapi = Nothing
  Set OutlookApp = Nothing

begin 666 sendmail1.vbs









`
end



Sun, 05 Oct 2003 20:28:30 GMT  
 I want to add attachments to emails in outlook
I want to add attachments to emails in outlook,
  when i run the vbs file, there is no error
  but it doesn't send the message and doc.

  Set OutlookApp = CreateObject("Outlook.Application")
  Set Mapi = OutlookApp.GetNameSpace("Mapi")
  Set List = OutlookApp.CreateItem(0)

  List.Subject = "Test"
  List.Body = "TwojaWiadomosc"
  List.Attachments.Add ("c:\test.txt")
  List.Send

  Set List = Nothing
  Set Mapi = Nothing
  Set OutlookApp = Nothing



Sun, 05 Oct 2003 20:55:17 GMT  
 I want to add attachments to emails in outlook
Your posted code (adjusted only for email address and file name) works perfectly fine for me...

--
Michael Harris
Microsoft.MVP.Scripting
--

Please do not email questions - post them to the newsgroup instead.
--

Quote:

>   I want to add attachments to emails in outlook,
>   when i run the vbs file, there is no error
>   but it doesn't send the message and doc.

>   Set OutlookApp = CreateObject("Outlook.Application")
>   Set Mapi = OutlookApp.GetNameSpace("Mapi")
>   Set List = OutlookApp.CreateItem(0)

>   List.Subject = "Test"
>   List.Body = "TwojaWiadomosc"
>   List.Attachments.Add ("c:\test.txt")
>   List.Send

>   Set List = Nothing
>   Set Mapi = Nothing
>   Set OutlookApp = Nothing



Mon, 06 Oct 2003 10:45:18 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. How to automate Outlook with email attachment from ASP Clinet using vb SCRIPT

2. How to automate Outlook with email attachment from ASP Clinet using vb SCRIPT

3. Add-in causes Outlook crash when Outlook launches as a result of email hyperlink

4. Printing list of attachments in Outlook in HTML email format

5. How to Open Outlook embeded email attachment in code

6. Outlook Attachments on outgoing email

7. Word Mail merge to Outlook Email with PDF Attachment

8. How to save email attachment using Outlook

9. Drag Drop an Outlook email attachment

10. DRAG an ATTACHMENT from an outlook incoming email message, ONTO a vb6 form directly

11. Using MAPI and Outlook to send email attachments?

12. Passing an attachment to Outlook and showing email

 

 
Powered by phpBB® Forum Software