Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Outlook / Programming VBA / October 2007

Tip: Looking for answers? Try searching our database.

How to reconstitute message with embedded image

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
MA - 29 Oct 2007 11:23 GMT
Hi,

I want to reconstitute a message from another client (Eudora,
GroupWise) to Outlook. The original message contains a embedded image
inside the message body. See below the message source in Outlook.

The body has the reference of "cid:ZYXXIKOOYRKF.home.gif". However, I
can not see any attachments. Is it a system/hidden attachments?

I need to reconstitute this message. How can I add the embedded image
inside the body?

---------------------------------------------
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=utf-8">
<META content="MSHTML 6.00.6000.16544" name=GENERATOR></HEAD>
<BODY style="MARGIN: 4px 4px 1px; FONT: 10pt Tahoma">
<DIV>Test message.</DIV>
<DIV><IMG alt="" hspace=0 src="cid:ZYXXIKOOYRKF.home.gif"
align=baseline border=0></DIV>
</BODY></HTML>
-----------------------------------------------

BTW, I am using the Redemption to create the message in Outlook.

Hope it make sense. Thanks in advance for your suggestions.

Regards,
MA
Dmitry Streblechenko - 29 Oct 2007 17:58 GMT
"I can not see any attachments" - what do you mean by that? Where/how do you
look for it?

Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy  - Outlook, CDO
and MAPI Developer Tool

> Hi,
>
[quoted text clipped - 25 lines]
> Regards,
> MA
MA - 30 Oct 2007 01:16 GMT
The body source above from Outlook client, when I view the message
with embedded image (sent from the other client to Outlook)

I will try to explain the situation:
The original message from other client has a embedded image inside the
message body and I have access to the image. Now I want to recreate
the message in Outlook with the embedded image inside the body.

You can see the screen-shot of the original message: http://screencast.com/t/8qBaR4qnx

How can I add the embedded image inside the Outlook message body?

Regards,
MA
Dmitry Streblechenko - 30 Oct 2007 18:34 GMT
Do you mean add an icon to the message body that would open the embedded
message when clicked?
Or add the embedded message as a regular attatchment without an icon in the
message body?
What is the source message format (MIME, etc)?

Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy  - Outlook, CDO
and MAPI Developer Tool

> The body source above from Outlook client, when I view the message
> with embedded image (sent from the other client to Outlook)
[quoted text clipped - 11 lines]
> Regards,
> MA
MA - 31 Oct 2007 20:09 GMT
I want to create a HTML message with embedded image.

I have followed the sample code (http://www.dimastr.com/redemption/
objects.htm#examples) but unable to find the SafeMailItem.Fields
perperties.

Anyway, the following code seems does the job:

-----------------------------------------------------------------
RDOAttachment attach = msg.Attachments.Add(@"C:\Temp\gwhome.gif",
Outlook.OlAttachmentType.olByValue, "", "gwhome.gif");
try
{
       attach.set_Fields(923664414, "image/gif");
    attach.set_Fields(923926558, "ZYXXIKOOYRKF.gwhome.gif");
    attach.set_Fields(2147352587, true);
}
finally
{
       Marshal.ReleaseComObject(attach);
    attach = null;
}
msg.HTMLBody = "test <STRONG>message</STRONG> body.<IMG align=baseline
border=0 hspace=0 src=cid:ZYXXIKOOYRKF.gwhome.gif>";
msg.Save();
-------------------------------------------------------------

Is there any documentation available about the field number (e.g.
923664414, 2147352587, etc) and what field its represent?

Cheers,
MA
Dmitry Streblechenko - 31 Oct 2007 21:29 GMT
PR_ATTACH_MIME_TAG, PR_ATTACHMENT_HIDDEN
Look at the message with MFCMAPI or OutlookSpy (click IMessage)

Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy  - Outlook, CDO
>I want to create a HTML message with embedded image.
>
[quoted text clipped - 28 lines]
> Cheers,
> MA
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.