How do I use formatted text from word document in email body

  • Thread starter Thread starter duckfeeder
  • Start date Start date
D

duckfeeder

Sorry, not used VB6 for a couple of years!!

the following uses the word text without formatting

mItem.Body = oWordDoc.Content

how can I keep the formatting?

Many thanks
 
The easiest is if you use Word as e-mail editor:

oWordDoc.Copy
Application.ActiveInspector.WordEditor.Paste

--
Best regards
Michael Bauer - MVP Outlook

: VBOffice Reporter for Data Analysis & Reporting
: Outlook Categories? Category Manager Is Your Tool:
: <http://www.vboffice.net/product.html?pub=6&lang=en>


Am Sat, 14 Jun 2008 17:02:00 -0700 schrieb duckfeeder:
 
Sorry to appear thick

once I have oWordDoc.Copy

does mItem.Body = oWordDoc.Content

become mItem.Application.ActiveInspector.WordEditor.Paste

it send s a blank email!

any suggestions?
 
Sorry, it should be:

oWordDoc.Range.Copy
mItem.Application.ActiveInspector.WordEditor.Range.Paste

--
Best regards
Michael Bauer - MVP Outlook

: VBOffice Reporter for Data Analysis & Reporting
: Outlook Categories? Category Manager Is Your Tool:
: <http://www.vboffice.net/product.html?pub=6&lang=en>


Am Sun, 15 Jun 2008 05:19:00 -0700 schrieb duckfeeder:
 
Dear Michael

Thanks for all your help

Although I did not get this work, I see the principle.

For now Sue's code does the job, although I will come back to your
suggestions as my experience grows again.
 
Thanks Sue

The code works a treat, much appreciated.

Any idea on how to stop "a program is trying to send email on your behalf"

This could be problem if trying to send lots of emails!!

Thanks

Rob
 
Back
Top