A Microsoft Outlook email forum. Outlook Banter

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » Outlook Banter forum » Microsoft Outlook Email Newsgroups » Outlook and VBA
Site Map Home Register Authors List Search Today's Posts Mark Forums Read Web Partners

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



 
 
Thread Tools Search this Thread Display Modes
  #1  
Old June 15th 08, 01:02 AM posted to microsoft.public.outlook.program_vba
duckfeeder
external usenet poster
 
Posts: 4
Default How do I use formatted text from word document in email body

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
  #2  
Old June 15th 08, 10:01 AM posted to microsoft.public.outlook.program_vba
Michael Bauer [MVP - Outlook]
external usenet poster
 
Posts: 1,885
Default How do I use formatted text from word document in email body



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, 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

  #3  
Old June 15th 08, 01:19 PM posted to microsoft.public.outlook.program_vba
duckfeeder
external usenet poster
 
Posts: 4
Default How do I use formatted text from word document in email body

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?

"Michael Bauer [MVP - Outlook]" wrote:



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, 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


  #4  
Old June 16th 08, 06:40 AM posted to microsoft.public.outlook.program_vba
Michael Bauer [MVP - Outlook]
external usenet poster
 
Posts: 1,885
Default How do I use formatted text from word document in email body



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:

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?

"Michael Bauer [MVP - Outlook]" wrote:



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, 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


  #5  
Old June 16th 08, 11:28 PM posted to microsoft.public.outlook.program_vba
duckfeeder
external usenet poster
 
Posts: 4
Default How do I use formatted text from word document in email body

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.

"Michael Bauer [MVP - Outlook]" wrote:



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:

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?

"Michael Bauer [MVP - Outlook]" wrote:



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, 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


  #6  
Old June 15th 08, 11:08 PM posted to microsoft.public.outlook.program_vba
Sue Mosher [MVP-Outlook]
external usenet poster
 
Posts: 11,651
Default How do I use formatted text from word document in email body

If you're creating a new message, you might want to try the "Office envelope" approach demonstrated in the sample at http://www.outlookforms.org/codedetail.aspx?id=1333.

--
Sue Mosher, Outlook MVP
Author of Microsoft Outlook 2007 Programming:
Jumpstart for Power Users and Administrators
http://www.outlookcode.com/article.aspx?id=54


"duckfeeder" wrote in message ...
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

  #7  
Old June 16th 08, 11:30 PM posted to microsoft.public.outlook.program_vba
duckfeeder
external usenet poster
 
Posts: 4
Default How do I use formatted text from word document in email body

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

"Sue Mosher [MVP-Outlook]" wrote:

If you're creating a new message, you might want to try the "Office envelope" approach demonstrated in the sample at http://www.outlookforms.org/codedetail.aspx?id=1333.

--
Sue Mosher, Outlook MVP
Author of Microsoft Outlook 2007 Programming:
Jumpstart for Power Users and Administrators
http://www.outlookcode.com/article.aspx?id=54


"duckfeeder" wrote in message ...
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


  #8  
Old June 17th 08, 12:47 AM posted to microsoft.public.outlook.program_vba
Sue Mosher [MVP-Outlook]
external usenet poster
 
Posts: 11,651
Default How do I use formatted text from word document in email body

See http://www.outlookcode.com/article.aspx?ID=52 for your options with regard to the "object model guard" security prompts.

--
Sue Mosher, Outlook MVP
Author of Microsoft Outlook 2007 Programming:
Jumpstart for Power Users and Administrators
http://www.outlookcode.com/article.aspx?id=54


"duckfeeder" wrote in message ...
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

"Sue Mosher [MVP-Outlook]" wrote:

If you're creating a new message, you might want to try the "Office envelope" approach demonstrated in the sample at http://www.outlookforms.org/codedetail.aspx?id=1333.



"duckfeeder" wrote in message ...
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


 




Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Cannot see text in email body Kevin Outlook Express 2 October 13th 07 06:42 AM
Word document text in body of E-mail [email protected] Outlook - General Queries 5 August 25th 07 10:28 PM
Rendering Word Document as Mail Body [email protected] Outlook - Fax Functions 4 August 5th 07 09:45 PM
Moving HTML-formatted messages to PST strips body of message Scotty Outlook - General Queries 0 February 8th 07 08:43 PM
Insert word document/Bookmark into email body paul Outlook and VBA 4 September 22nd 06 01:45 PM


All times are GMT +1. The time now is 04:29 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.Search Engine Friendly URLs by vBSEO 2.4.0
Copyright ©2004-2025 Outlook Banter.
The comments are property of their posters.