Html attachment visible in mailitem body 
Author Message
 Html attachment visible in mailitem body

Hi.

I need to attach a html file, which is received by the user in the body,
rather than a linked attachment. I am building an App in VB6 that uses the
Outlook Model.

I use the following syntax to attach the file:

                             Set olAttach = olMsg.Attachments
                             olAttach.Add mvarHTMLTemplatePath, olByValue,
1, "Name"

This works fine, as long as I display the message before send, ie.
olMsg.Display
Clicking Send on the form sends the mailitem as planned and displays the
html in the message to the user - in the body and preview-pane. (without
using the htmlbody property

I cannot display the message though, but need to send it in the background.
Using ' olMsg.Send ' though, only shows the html file as an attachment to
the recipient.

This is where I am stuck. I'm grateful for any pointers!!

Cheers,

Soenke
Sydney, Australia



Mon, 03 Nov 2003 17:07:59 GMT  
 Html attachment visible in mailitem body
Try reading the file in as text in a single get statement, and setting the
olMsg.Body = [html text]
Quote:
-----Original Message-----

Hi.

I need to attach a html file, which is received by the user in the body,
rather than a linked attachment. I am building an App in VB6 that uses the
Outlook Model.

I use the following syntax to attach the file:

                             Set olAttach = olMsg.Attachments
                             olAttach.Add mvarHTMLTemplatePath, olByValue,
1, "Name"

This works fine, as long as I display the message before send, ie.
olMsg.Display
Clicking Send on the form sends the mailitem as planned and displays the
html in the message to the user - in the body and preview-pane. (without
using the htmlbody property

I cannot display the message though, but need to send it in the background.
Using ' olMsg.Send ' though, only shows the html file as an attachment to
the recipient.

This is where I am stuck. I'm grateful for any pointers!!

Cheers,

Soenke
Sydney, Australia

.



Tue, 04 Nov 2003 21:06:39 GMT  
 Html attachment visible in mailitem body
I think you mean olMsg.HTMLBody = [html text]


Try reading the file in as text in a single get statement, and setting the
olMsg.Body = [html text]

Quote:
-----Original Message-----

Hi.

I need to attach a html file, which is received by the user in the body,
rather than a linked attachment. I am building an App in VB6 that uses the
Outlook Model.

I use the following syntax to attach the file:

                             Set olAttach = olMsg.Attachments
                             olAttach.Add mvarHTMLTemplatePath, olByValue,
1, "Name"

This works fine, as long as I display the message before send, ie.
olMsg.Display
Clicking Send on the form sends the mailitem as planned and displays the
html in the message to the user - in the body and preview-pane. (without
using the htmlbody property

I cannot display the message though, but need to send it in the background.
Using ' olMsg.Send ' though, only shows the html file as an attachment to
the recipient.

This is where I am stuck. I'm grateful for any pointers!!

Cheers,

Soenke
Sydney, Australia

.



Wed, 05 Nov 2003 00:24:25 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. How to save MailItem.Body into HTML file?

2. Retrieve HTML body from attachment

3. HTML attachment displayed in message body in MS Outlook

4. Q: Attachment: How to insert filename of attachment in message body

5. Saving Outlook mailitem body

6. MailItem body truncated

7. MailItem.Body - lines are being split at 72 characters

8. Body text alignment in MailItem

9. Redemption, MAPI, and new MailItem body

10. MailItem.Body truncated for large messages

11. BUG with mailitem.body in Outlook 2000?

12. How can I embed object an office document into Mailitem Body

 

 
Powered by phpBB® Forum Software