473,804 Members | 3,776 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 2196
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**********@01 C40CE2.BC9414E0
Content-Type: IMAGE/GIF
Content-Transfer-Encoding: BASE64

R0lGODlhGAGgAPE AAP/////ZRaCgoAAAACH+PU NvcHlyaWdodCAoQ ykgMTk5
NSBJRVRGLiBVbmF 1dGhvcml6ZWQgZH VwbGljYXRpb24gc HJvaGliaXRlZC4A
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.goo gle.com...
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.co m> wrote in message news:<hV******* ***********@twi ster.tampabay.r r.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**********@01 C40CE2.BC9414E0
Content-Type: IMAGE/GIF
Content-Transfer-Encoding: BASE64

R0lGODlhGAGgAPE AAP/////ZRaCgoAAAACH+PU NvcHlyaWdodCAoQ ykgMTk5
NSBJRVRGLiBVbmF 1dGhvcml6ZWQgZH VwbGljYXRpb24gc HJvaGliaXRlZC4A
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
5419
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? I find no list of TOPICS to use with the DDE related commands in Access Basic or VBA
10
2860
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 using the office2000 interop dlls generated by vs.net by adding office 2000 com reference. Any one else noticed this problem when targeting office2000/xp mixed environments? Is there a better, more robust way to do this? Am I better off using late...
14
4957
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 in the sender's Outlook Sent Items. How do I do that? Thanks.
26
4507
by: Tom Becker | last post by:
Is there a way, from Access, to programmatically click the Send and Receive button in Outlook?
5
3330
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 time-periods that the rooms are booked for that day. I know how to code all this in Access. I can show some testdata for 5 rooms quite nicely on a form. I never ever needed to use Outlook-to-Access before, so I need a good starting point to get the data.
0
1449
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 binding but it appears I'm not having much luck. The code works ONLY if Outlook is loaded. I'm a bit unfamiliar with Outlook...been using Netscape for way too long. When I start Outlook, it prompts me for a profile. How do you handle that via...
1
3226
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 and server (Exchange server mail box) to connect and then save the mailitems(from Inbox or any other folder) based on a filter to a*.msg file. I want to achieve this using only one Interop dll if this is possible. Tried so far:
1
2872
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 and server (Exchange server mail box) to connect and then save the mailitems(from Inbox or any other folder) based on a filter to a*.msg file. I want to achieve this using only one Interop dll if this is possible. Tried so far:
0
1600
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 sending things to outlook.. and OutlookHandler has a list of outlookmessages for example I know that outlookHandler will typically have methods like the following
0
9706
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10583
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10337
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10323
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10082
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9160
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7622
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5525
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5654
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?

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.