?
Solved

Problem creating HTMLBody infoormation in Outlook OlMailItem..

Posted on 2008-11-20
4
Medium Priority
?
492 Views
Last Modified: 2013-11-10
I have a VBA script which I'm running in Word to create emails containing the Word document and an  attachment.

It works fine except for the fact it uses

.Body = ActiveDocument.Content which removes all the formatting from the Word document.

I want to email the Word Document as it is, formatted.

I thought I would try .HTMLBody and do it that way, but I don't know  how to get the text contained in ActiveDocument.Content into an HTML Tag.

Any help appreciated.
0
Comment
Question by:chrisfixit
  • 2
  • 2
4 Comments
 
LVL 5

Expert Comment

by:danirk2
ID: 23002497
2 main options:

1. Use Word-Api  to convert to html
2. Send as attachment
0
 
LVL 1

Author Comment

by:chrisfixit
ID: 23002599
Ah thanks, any pointers to option one?

The thing is this is for a hotel.

 They are mailing their travel agents and the like and have a preformatted Word Document with their      logo etc..the attachment is the latest price list.

Up until now they have done it manually sending 20 or so at a time, but want to automate it.

They also send the info to some clients by Fax, and it's important to them that the email looks similar to the Fax.
0
 
LVL 5

Accepted Solution

by:
danirk2 earned 2000 total points
ID: 23002644
Document.Open(...)
Document.SaveAs(...) , with FileFormat set to WdSaveFormat.wdFormatHTML
0
 
LVL 1

Author Closing Comment

by:chrisfixit
ID: 31518627
Thanks, I'm now trying to convert VBA to VB .NET ;-)
0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Whether you’re a college noob or a soon-to-be pro, these tips are sure to help you in your journey to becoming a programming ninja and stand out from the crowd.
In this post we will learn how to connect and configure Android Device (Smartphone etc.) with Android Studio. After that we will run a simple Hello World Program.
Simple Linear Regression
Progress

809 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question