Word Document to Outlook as an email body without loosing the formatting 
Author Message
 Word Document to Outlook as an email body without loosing the formatting

Hi,

Using VB6 I open a word document, select everything in the document
(oWordDoc.Content) to a variable (of type variant) and then use the variable
to create the body of an outlook message. The problem I'm having is it
looses all the formatting.

Is there a way to open a word doc using VB6, get everything into a variable
and NOT loose the formatting?

Thanks.



Tue, 18 Jan 2005 03:01:10 GMT  
 Word Document to Outlook as an email body without loosing the formatting
Hi!
Not that I know of because Item.Body does not support
formatting.

You could try using html instead and then set the variable
to Item.HTMLBody=. As all the HTML formatiing codes are
placed in the body, the message will appear the same as if
it were displayed in a browser.

Dave

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

>Hi,

>Using VB6 I open a word document, select everything in
the document
>(oWordDoc.Content) to a variable (of type variant) and

then use the variable
Quote:
>to create the body of an outlook message. The problem I'm
having is it
>looses all the formatting.

>Is there a way to open a word doc using VB6, get

everything into a variable
Quote:
>and NOT loose the formatting?

>Thanks.

>.



Tue, 18 Jan 2005 03:46:57 GMT  
 Word Document to Outlook as an email body without loosing the formatting
Thanks for the reply Dave. The HTMLBody property works great for HTML
documents but when I have a word document (.doc) HTML screws up the format.
I could convert the .doc to .htm but then I still might loose some of the
formatting....


Quote:
> Hi!
> Not that I know of because Item.Body does not support
> formatting.

> You could try using html instead and then set the variable
> to Item.HTMLBody=. As all the HTML formatiing codes are
> placed in the body, the message will appear the same as if
> it were displayed in a browser.

> Dave

> >-----Original Message-----

> >Hi,

> >Using VB6 I open a word document, select everything in
> the document
> >(oWordDoc.Content) to a variable (of type variant) and
> then use the variable
> >to create the body of an outlook message. The problem I'm
> having is it
> >looses all the formatting.

> >Is there a way to open a word doc using VB6, get
> everything into a variable
> >and NOT loose the formatting?

> >Thanks.

> >.



Tue, 18 Jan 2005 04:03:34 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. Copying without loosing the format

2. Sending an email with format in the body from A2K

3. Code to extract a formatted message body of an email into an access Database

4. format body of Email automation

5. Formatting email body using VBA in Access

6. Formatting email body using VBA in Access

7. Loosing general Word-functions when protecting documents

8. REPOST: Body text not displayed in VBA-generated email (Outlook 2002)

9. Word Doc As Email Body

10. Fill Body of Email with contents of a Word file

11. Automate email to have a body containing a Word RTF file

12. Formatting body text in Outlook Express

 

 
Powered by phpBB® Forum Software