Re: embeded image change

  • Thread starter Ken Slovak - [MVP - Outlook]
  • Start date Views 2,100
Status
Not open for further replies.
K

Ken Slovak - [MVP - Outlook]

What BodyFormat is the message in? Have you tried supplying a

missing/default argument for the Position argument (not sure how that would

be done using C++).

"Ashish" <akohli_2004@hotmail.com> wrote in message

news:enarA%23xnJHA.3572@TK2MSFTNGP05.phx.gbl...
> I remove the code to set subject. But still embeded image is not visible
> when open mail. Now i'm sure it happens due to adding an attachment. If i
> dont add attachment then embeded image is visible. Attachment is a text
> file. I use following code to add attachment

> variant_t vpath(attachfile_path.c_str());

> variant_t vposition( 1);

> variant_t vdisplay(attachfilename);

> variant_t filetype((long)1);

> ((Outlook::_MailItemPtr)MailItemptr)->Attachments->Add(vpath,filetype,vposition,vdisplay);
 
A

Ashish

I dont check the body format. In my addin when i open a mail i just add one

attachment to it. what is missing/default argument for the Position argument

? where we need to pass it?

When i add an attachment then i pass attachment position.
<kenslovak@mvps.org> wrote in message

news:OweBYnMoJHA.3984@TK2MSFTNGP02.phx.gbl...
> What BodyFormat is the message in? Have you tried supplying a
> missing/default argument for the Position argument (not sure how that
> would be done using C++).

> >

>

> "Ashish" <akohli_2004@hotmail.com> wrote in message
> news:enarA%23xnJHA.3572@TK2MSFTNGP05.phx.gbl...
> >I remove the code to set subject. But still embeded image is not visible
> >when open mail. Now i'm sure it happens due to adding an attachment. If i
> >dont add attachment then embeded image is visible. Attachment is a text
> >file. I use following code to add attachment
>

>> variant_t vpath(attachfile_path.c_str());
>

>> variant_t vposition( 1);
>

>> variant_t vdisplay(attachfilename);
>

>> variant_t filetype((long)1);
>

>> ((Outlook::_MailItemPtr)MailItemptr)->Attachments->Add(vpath,filetype,vposition,vdisplay);

>
 
A

Ashish

When open mail then first i check all attachments in this mail.

Mail->Attachments->Count = 0. Embeded image is in body of mail

Then i add an attachment. After adding attachment i cant see embeded image

in mail body. But when i close this mail Mail->Attachments->Count shows

value 2. It means when i add an attachment embeded image is converted into

attachment(by val). But it doesn't show that attachment.

What's wrong here why embeded image change into attachment. Is there any

solution for this case.
<kenslovak@mvps.org> wrote in message

news:OweBYnMoJHA.3984@TK2MSFTNGP02.phx.gbl...
> What BodyFormat is the message in? Have you tried supplying a
> missing/default argument for the Position argument (not sure how that
> would be done using C++).

> >

>

> "Ashish" <akohli_2004@hotmail.com> wrote in message
> news:enarA%23xnJHA.3572@TK2MSFTNGP05.phx.gbl...
> >I remove the code to set subject. But still embeded image is not visible
> >when open mail. Now i'm sure it happens due to adding an attachment. If i
> >dont add attachment then embeded image is visible. Attachment is a text
> >file. I use following code to add attachment
>

>> variant_t vpath(attachfile_path.c_str());
>

>> variant_t vposition( 1);
>

>> variant_t vdisplay(attachfilename);
>

>> variant_t filetype((long)1);
>

>> ((Outlook::_MailItemPtr)MailItemptr)->Attachments->Add(vpath,filetype,vposition,vdisplay);

>
 
K

Ken Slovak - [MVP - Outlook]

What is wrong is the Count == 0 return. Any embedded image is an attachment,

how else would it be included in the message? An embedded attachment will

have certain properties set on it that are different than an "attached"

attachment, but it's still attached to the message.

Is the item you are opening saved before you check for attachments count?

That's important. Also important is the Outlook version and body format. For

example in some cases an embedded attachment such as ClipArt will actually

show up as 2 attachments, one is the content and the other is a WMV wrapper.

"Ashish" <akohli_2004@hotmail.com> wrote in message

news:%239VXQ3WoJHA.3896@TK2MSFTNGP04.phx.gbl...
> When open mail then first i check all attachments in this mail.
> Mail->Attachments->Count = 0. Embeded image is in body of mail
> Then i add an attachment. After adding attachment i cant see embeded image
> in mail body. But when i close this mail Mail->Attachments->Count shows
> value 2. It means when i add an attachment embeded image is converted into
> attachment(by val). But it doesn't show that attachment.
> What's wrong here why embeded image change into attachment. Is there any
> solution for this case.
 
A

Ashish

> What is wrong is the Count == 0 return. Any >embedded image is an
> attachment,


when i open mail which contains embeded attachments i check

Mail->Attachments->Count value and it returns 0.

I check this in Item_Open() event.

So in this case attachment for embeded image is not attached to message.

Either it's in body or i dont have more idea where it is.

Is the item you are opening saved before you check for attachments count?

I send a new mail with embeded image. After mail is received i open the

mail. Before opening this mail i dont save it.

I dont touch body format for this mail.

Is there any example for embeded image available?
<kenslovak@mvps.org> wrote in message

news:eHjk4UYoJHA.1172@TK2MSFTNGP05.phx.gbl...
> What is wrong is the Count == 0 return. Any embedded image is an
> attachment, how else would it be included in the message? An embedded
> attachment will have certain properties set on it that are different than
> an "attached" attachment, but it's still attached to the message.

> Is the item you are opening saved before you check for attachments count?
> That's important. Also important is the Outlook version and body format.
> For example in some cases an embedded attachment such as ClipArt will
> actually show up as 2 attachments, one is the content and the other is a
> WMV wrapper.

> >

>

> "Ashish" <akohli_2004@hotmail.com> wrote in message
> news:%239VXQ3WoJHA.3896@TK2MSFTNGP04.phx.gbl...
> > When open mail then first i check all attachments in this mail.
> > Mail->Attachments->Count = 0. Embeded image is in body of mail
> > Then i add an attachment. After adding attachment i cant see embeded
> > image in mail body. But when i close this mail Mail->Attachments->Count
> > shows value 2. It means when i add an attachment embeded image is
> > converted into attachment(by val). But it doesn't show that attachment.
> > What's wrong here why embeded image change into attachment. Is there any
> > solution for this case.

>
 
K

Ken Slovak - [MVP - Outlook]

I don't care how or where it's opened or how it's done, all embedded images

are attachments on the item. Period.

It may be a hidden attachment, where if the property is set it doesn't show

the paperclip icon on the item, but it's still an attachment.

There are lots of different samples available for embedded attachments,

search on Google and at www.outlookcode.com for some.

"Ashish" <akohli_2004@hotmail.com> wrote in message

news:OgqamwYoJHA.6096@TK2MSFTNGP02.phx.gbl...
> > What is wrong is the Count == 0 return. Any >embedded image is an
> > attachment,

> when i open mail which contains embeded attachments i check
> Mail->Attachments->Count value and it returns 0.
> I check this in Item_Open() event.
> So in this case attachment for embeded image is not attached to message.
> Either it's in body or i dont have more idea where it is.

> Is the item you are opening saved before you check for attachments count?
> I send a new mail with embeded image. After mail is received i open the
> mail. Before opening this mail i dont save it.

> I dont touch body format for this mail.
> Is there any example for embeded image available?
 
Status
Not open for further replies.
Top