473,386 Members | 1,745 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

Outlook Automation and graphics

Using Outlook Automation, is there a way to insert a graphic in the
body of an e-mail so that it appears at the top of an email?
lq
Nov 12 '05 #1
2 2174
I have a way, but it is a workaround. The message must be sent as HTML
Format and you format the entire body of the message as string that you pass
to the HTMLBody property of the MailItem class. Just include an image tag
(for example, <img src='http://www.someserver.com/mylogo.gif' align='right'
width=450 height=192 border=0 alt="My Company Name">) that refers to an
image you have stored on a web server somewhere. This has some obvious
limits, but the company I work for uses this method to send quotes every day
without bumping into them yet. Good enough, but not perfect.

This is some background about what you are trying to do. If you open a
message that was created in outlook and contains an image, right click it
and view the source, you will see a tag with something like <img
src="cid:im**********@01C40CE2.BC9414E0">. The URL refers to the image that
is included elsewhere in the message. That elsewhere would be delineated as:

Content-ID: im**********@01C40CE2.BC9414E0
Content-Type: IMAGE/GIF
Content-Transfer-Encoding: BASE64

R0lGODlhGAGgAPEAAP/////ZRaCgoAAAACH+PUNvcHlyaWdodCAoQykgMTk5
NSBJRVRGLiBVbmF1dGhvcml6ZWQgZHVwbGljYXRpb24gcHJvaG liaXRlZC4A
etc...

But, you can't see this part, Outlook doesn't expose it to us. I know this
is what is happening by it is described in RFC 2111 at
http://www.faqs.org/rfcs/. I haven't found an exposed or hidden method that
allows you to include content in the message by automation. I would like to
be able to do it the same way Outlook and other email tools do. But I don't
want create the entire message from scratch and send it by SMTP, in effect
creating my own email system.

There are some tantalizing messages in other news groups, for instance I
have seen one that indicates it might be possible to do this from MS Word,
but I haven't tried or tested it. Another refers to including the image as
an attachment and referring to it with a relative reference. Google "image
in email"

I didn't answer immediately because I hoped someone else had a different
answer. The workaround works.

HTH
--
Jeffrey R. Bailey
"Lauren Quantrell" <la*************@hotmail.com> wrote in message
news:47**************************@posting.google.c om...
Using Outlook Automation, is there a way to insert a graphic in the
body of an e-mail so that it appears at the top of an email?
lq

Nov 12 '05 #2
Jeffrey,
Thanks for this. I figured out that HTML works and I apply a template
to locate the image. That works fine, except, if the data being
exported to Outlook is more than one page, it wants to make multiple
e-mails out of it.
Sort of a drag. So what I have done instead is to export as RTF and
use an Outlook template file that has the logo already.
lq

"Jeffrey R. Bailey" <Mr******************@yahoo.com> wrote in message news:<hV******************@twister.tampabay.rr.com >...
I have a way, but it is a workaround. The message must be sent as HTML
Format and you format the entire body of the message as string that you pass
to the HTMLBody property of the MailItem class. Just include an image tag
(for example, <img src='http://www.someserver.com/mylogo.gif' align='right'
width=450 height=192 border=0 alt="My Company Name">) that refers to an
image you have stored on a web server somewhere. This has some obvious
limits, but the company I work for uses this method to send quotes every day
without bumping into them yet. Good enough, but not perfect.

This is some background about what you are trying to do. If you open a
message that was created in outlook and contains an image, right click it
and view the source, you will see a tag with something like <img
src="cid:im**********@01C40CE2.BC9414E0">. The URL refers to the image that
is included elsewhere in the message. That elsewhere would be delineated as:

Content-ID: im**********@01C40CE2.BC9414E0
Content-Type: IMAGE/GIF
Content-Transfer-Encoding: BASE64

R0lGODlhGAGgAPEAAP/////ZRaCgoAAAACH+PUNvcHlyaWdodCAoQykgMTk5
NSBJRVRGLiBVbmF1dGhvcml6ZWQgZHVwbGljYXRpb24gcHJvaG liaXRlZC4A
etc...

But, you can't see this part, Outlook doesn't expose it to us. I know this
is what is happening by it is described in RFC 2111 at
http://www.faqs.org/rfcs/. I haven't found an exposed or hidden method that
allows you to include content in the message by automation. I would like to
be able to do it the same way Outlook and other email tools do. But I don't
want create the entire message from scratch and send it by SMTP, in effect
creating my own email system.

There are some tantalizing messages in other news groups, for instance I
have seen one that indicates it might be possible to do this from MS Word,
but I haven't tried or tested it. Another refers to including the image as
an attachment and referring to it with a relative reference. Google "image
in email"

I didn't answer immediately because I hoped someone else had a different
answer. The workaround works.

HTH

Nov 13 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
by: MLH | last post by:
Is the following remotely correct? =DDE("C:\Program Files\Program Files\Outlook Express\OEmig50","Attachment","Name") I'm not sure that OEmig50.exe is the executable for OE. Anybody know? ...
10
by: John | last post by:
Hi When I open a new outlook email from vb.net, sometimes outlook is very slow to appear or occasionally outlook freezes completely. I am targeting mixed office2000/xp environments so I am...
14
by: Gerhard | last post by:
I'm posting this again, as no answer to the first post.... I would like to integrate Outlook into my vb.net web page, so that when I send an email (which I can successfully do now), it shows up...
26
by: Tom Becker | last post by:
Is there a way, from Access, to programmatically click the Send and Receive button in Outlook?
5
by: Arno R | last post by:
Hi all, I need to get at specific (shared) agenda-data from MS outlook 2003. I need every day to get the scheduled 'appointments' for some rooms to Access. In Access I will show the...
0
by: salad | last post by:
I'm on A97 and have Outlook 2003 on the computer. There's some generic code at Tony Toew's site and at MS and on the web that's very similar....but I can't make it work. I want to use late...
1
by: =?Utf-8?B?cm9i?= | last post by:
C#.Net Outlook 2003 automation (programmatically) with Office.Interop.Outlook Problem: I have my outlook 2003 configured with multiple mailbox on my local machine. I want to specify the mailbox...
1
by: allbelonging | last post by:
C#.Net Outlook 2003 automation (programmatically) with Office.Interop.Outlook Problem: I have my outlook 2003 configured with multiple mailbox on my local machine. I want to specify the mailbox...
0
by: madihamir | last post by:
Iam new to .net and have gotten assignment for make the class library to automate the outlook I have tried to done it but i've to make the Handlers also . Detecting an methods for receiving and...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.