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

Import bold face fonts



 
 
Thread Tools Search this Thread Display Modes
  #1  
Old January 5th 08, 12:52 AM posted to microsoft.public.outlook.program_vba
Edward
external usenet poster
 
Posts: 56
Default Import bold face fonts

Hi everyone
I'm using VBA to import the bodytext of an email message from Word
everything works find except for it dosn't keep the bold face font when it
imports to Outlook.
I have a section in my word document which has bold font but when i use the
following code
..
..
..
.body=Activedocument.convert
..
..
..
It converts everytjing with correct formatting but dons't keep the bold
fonts .
Is there any soultion for this?
--
Best regards,
Edward
Ads
  #2  
Old January 5th 08, 09:31 AM posted to microsoft.public.outlook.program_vba
Michael Bauer [MVP - Outlook]
external usenet poster
 
Posts: 1,885
Default Import bold face fonts



If you write text into the Body property you create a plain text e-mail,
which cannot have formattings.

Easiest approach would be using Word as e-mail editor (or Outlook 07 only).
Then MailItem.Getinspector.WordEditor returns a Word.Document object with
all the properties that your source document has.

If that doesn't work for you you need to write the HTML code yourself into
the MailItem.HTMLBody property.

--
Best regards
Michael Bauer - MVP Outlook
Synchronize Outlook Categories:
http://www.vboffice.net/product.html?id=2006063&cmd=detail&lang=en&pub=6

Am Fri, 4 Jan 2008 15:52:01 -0800 schrieb Edward:

Hi everyone
I'm using VBA to import the bodytext of an email message from Word
everything works find except for it dosn't keep the bold face font when it
imports to Outlook.
I have a section in my word document which has bold font but when i use

the
following code
.
.
.
.body=Activedocument.convert
.
.
.
It converts everytjing with correct formatting but dons't keep the bold
fonts .
Is there any soultion for this?

  #3  
Old January 5th 08, 04:02 PM posted to microsoft.public.outlook.program_vba
Sue Mosher [MVP-Outlook]
external usenet poster
 
Posts: 11,651
Default Import bold face fonts

Yet another approach appropriate to creating a new message from the content of a Word document is to use the MsoEnvelope object; see http://www.outlookcode.com/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


"Michael Bauer [MVP - Outlook]" wrote in message .. .


If you write text into the Body property you create a plain text e-mail,
which cannot have formattings.

Easiest approach would be using Word as e-mail editor (or Outlook 07 only).
Then MailItem.Getinspector.WordEditor returns a Word.Document object with
all the properties that your source document has.

If that doesn't work for you you need to write the HTML code yourself into
the MailItem.HTMLBody property.

--
Best regards
Michael Bauer - MVP Outlook
Synchronize Outlook Categories:
http://www.vboffice.net/product.html?id=2006063&cmd=detail&lang=en&pub=6

Am Fri, 4 Jan 2008 15:52:01 -0800 schrieb Edward:

Hi everyone
I'm using VBA to import the bodytext of an email message from Word
everything works find except for it dosn't keep the bold face font when it
imports to Outlook.
I have a section in my word document which has bold font but when i use

the
following code
.
.
.
.body=Activedocument.convert
.
.
.
It converts everytjing with correct formatting but dons't keep the bold
fonts .
Is there any soultion for this?

  #4  
Old January 5th 08, 04:49 PM posted to microsoft.public.outlook.program_vba
Michael Bauer [MVP - Outlook]
external usenet poster
 
Posts: 1,885
Default Import bold face fonts



Very nice!

--
Best regards
Michael Bauer - MVP Outlook
Synchronize Outlook Categories:
http://www.vboffice.net/product.html?id=2006063&cmd=detail&lang=en&pub=6

Am Sat, 5 Jan 2008 10:02:20 -0500 schrieb Sue Mosher [MVP-Outlook]:

Yet another approach appropriate to creating a new message from the

content of a Word document is to use the MsoEnvelope object; see
http://www.outlookcode.com/codedetail.aspx?id=1333
 




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
How do I type a smiley face in an Outlook email? Jim Outlook - General Queries 4 February 20th 10 08:36 PM
How do you make a smiley face using keyboard? Dylan's mamaw Outlook - General Queries 2 February 20th 10 08:31 PM
How do I type a smiley face in an Outlook email? Jim Outlook - General Queries 0 June 27th 07 10:46 PM
Bold dates aren't bold enough Mark Rae Outlook - General Queries 5 February 4th 07 06:09 PM


All times are GMT +1. The time now is 12:55 PM.


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.