Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
ben ben is offline
external usenet poster
 
Posts: 67
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 9,101
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,123
Default 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   Report Post  
Posted to microsoft.public.excel.programming
ben ben is offline
external usenet poster
 
Posts: 67
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Retrieve Outlook mails from Excel Kiran Excel Programming 4 May 19th 09 04:03 PM
signal for incoming mails in outlook express oercim Excel Programming 1 March 30th 06 01:59 PM
Import of Outlook Mails to Excel Sheet Ajay Setting up and Configuration of Excel 6 July 24th 05 11:39 PM
sending mails using outlook Bart van den Burg Excel Programming 1 November 11th 04 12:51 PM
retreiving number of e-mails from public folder in Outlook Barmaley Excel Programming 1 July 15th 03 09:47 PM


All times are GMT +1. The time now is 08:31 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"