Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Images in outlook e-mails.
I am trying to create a newsletter type macro that allows us to send
flyers/sales out to a customer list. Creating the e-mails, adding attachments, adding recipients has been accomplished with no problem. Now I am having an issue adding pictures to an e-mail. I am trying to copy the "insert-picture from file" functionality when you are creating an outlook message. I recorded a macro when doing so and received the following line Selection.InlineShapes.AddPicture Filename:="C:\b&w.jpg", LinkToFile:= _ False, SaveWithDocument:=True Turns out that I'm using Word as my e-mail editor and that is a Word command and can't be used with.. Dim oOutlook As Object Dim oMailItem As Object Dim oRecipient As Object Dim oNameSpace As Object Set oOutlook = CreateObject("Outlook.Application") Set oNameSpace = oOutlook.GetNameSpace("MAPI") oNameSpace.Logon , , True For u = 1 To 1 Set oMailItem = oOutlook.CreateItem(0) Set oRecipient = _ ") oRecipient.Type = 1 '1 = To, use 2 for cc 'keep repeating these lines with 'your names, adding to the collection. With oMailItem ..Subject = "Tux - Test" ..Body = bstr '.InlineShapes.AddPicture Filename:="C:\b&w.jpg", LinkToFile:= _ False, SaveWithDocument:=True ..display End With Does anyone know the best way to do this? -- When you lose your mind, you free your life. |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Images in outlook e-mails.
See Ron Debruin website for sending email. the body of the email needs to be
HTML and you have to save the picture into a HTML file and then import that picture into the word/email document www.Rondebruin.com "ben" wrote: I am trying to create a newsletter type macro that allows us to send flyers/sales out to a customer list. Creating the e-mails, adding attachments, adding recipients has been accomplished with no problem. Now I am having an issue adding pictures to an e-mail. I am trying to copy the "insert-picture from file" functionality when you are creating an outlook message. I recorded a macro when doing so and received the following line Selection.InlineShapes.AddPicture Filename:="C:\b&w.jpg", LinkToFile:= _ False, SaveWithDocument:=True Turns out that I'm using Word as my e-mail editor and that is a Word command and can't be used with.. Dim oOutlook As Object Dim oMailItem As Object Dim oRecipient As Object Dim oNameSpace As Object Set oOutlook = CreateObject("Outlook.Application") Set oNameSpace = oOutlook.GetNameSpace("MAPI") oNameSpace.Logon , , True For u = 1 To 1 Set oMailItem = oOutlook.CreateItem(0) Set oRecipient = _ ") oRecipient.Type = 1 '1 = To, use 2 for cc 'keep repeating these lines with 'your names, adding to the collection. With oMailItem .Subject = "Tux - Test" .Body = bstr '.InlineShapes.AddPicture Filename:="C:\b&w.jpg", LinkToFile:= _ False, SaveWithDocument:=True .display End With Does anyone know the best way to do this? -- When you lose your mind, you free your life. |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Images in outlook e-mails.
Hi Joel
It is .nl <g http://www.rondebruin.nl/tips.htm For the OP Try this example http://www.rondebruin.nl/mail/folder3/mailenvelope.htm -- Regards Ron de Bruin http://www.rondebruin.nl/tips.htm "Joel" wrote in message ... See Ron Debruin website for sending email. the body of the email needs to be HTML and you have to save the picture into a HTML file and then import that picture into the word/email document www.Rondebruin.com "ben" wrote: I am trying to create a newsletter type macro that allows us to send flyers/sales out to a customer list. Creating the e-mails, adding attachments, adding recipients has been accomplished with no problem. Now I am having an issue adding pictures to an e-mail. I am trying to copy the "insert-picture from file" functionality when you are creating an outlook message. I recorded a macro when doing so and received the following line Selection.InlineShapes.AddPicture Filename:="C:\b&w.jpg", LinkToFile:= _ False, SaveWithDocument:=True Turns out that I'm using Word as my e-mail editor and that is a Word command and can't be used with.. Dim oOutlook As Object Dim oMailItem As Object Dim oRecipient As Object Dim oNameSpace As Object Set oOutlook = CreateObject("Outlook.Application") Set oNameSpace = oOutlook.GetNameSpace("MAPI") oNameSpace.Logon , , True For u = 1 To 1 Set oMailItem = oOutlook.CreateItem(0) Set oRecipient = _ ") oRecipient.Type = 1 '1 = To, use 2 for cc 'keep repeating these lines with 'your names, adding to the collection. With oMailItem .Subject = "Tux - Test" .Body = bstr '.InlineShapes.AddPicture Filename:="C:\b&w.jpg", LinkToFile:= _ False, SaveWithDocument:=True .display End With Does anyone know the best way to do this? -- When you lose your mind, you free your life. |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Images in outlook e-mails.
Thank you. :)
I also found a way to do it using Redemption and CDO from outlook -- When you lose your mind, you free your life. "Joel" wrote: See Ron Debruin website for sending email. the body of the email needs to be HTML and you have to save the picture into a HTML file and then import that picture into the word/email document www.Rondebruin.com "ben" wrote: I am trying to create a newsletter type macro that allows us to send flyers/sales out to a customer list. Creating the e-mails, adding attachments, adding recipients has been accomplished with no problem. Now I am having an issue adding pictures to an e-mail. I am trying to copy the "insert-picture from file" functionality when you are creating an outlook message. I recorded a macro when doing so and received the following line Selection.InlineShapes.AddPicture Filename:="C:\b&w.jpg", LinkToFile:= _ False, SaveWithDocument:=True Turns out that I'm using Word as my e-mail editor and that is a Word command and can't be used with.. Dim oOutlook As Object Dim oMailItem As Object Dim oRecipient As Object Dim oNameSpace As Object Set oOutlook = CreateObject("Outlook.Application") Set oNameSpace = oOutlook.GetNameSpace("MAPI") oNameSpace.Logon , , True For u = 1 To 1 Set oMailItem = oOutlook.CreateItem(0) Set oRecipient = _ ") oRecipient.Type = 1 '1 = To, use 2 for cc 'keep repeating these lines with 'your names, adding to the collection. With oMailItem .Subject = "Tux - Test" .Body = bstr '.InlineShapes.AddPicture Filename:="C:\b&w.jpg", LinkToFile:= _ False, SaveWithDocument:=True .display End With Does anyone know the best way to do this? -- When you lose your mind, you free your life. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Retrieve Outlook mails from Excel | Excel Programming | |||
signal for incoming mails in outlook express | Excel Programming | |||
Import of Outlook Mails to Excel Sheet | Setting up and Configuration of Excel | |||
sending mails using outlook | Excel Programming | |||
retreiving number of e-mails from public folder in Outlook | Excel Programming |