Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Word / Programming / September 2006

Tip: Looking for answers? Try searching our database.

How to copy RTF into another application?

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
John Riddle - 28 Aug 2006 19:45 GMT
Hello,

I have a macro that parses a Word Document (a resume) and creates an Outlook
contact out of it. I then copy and paste the entire contents of the document
to the Notes field in Outlook. A manual copy/paste of a Word document's
contents into the Notes field in Outlook preserves the RTF formatting.
However, when I do this programmatically, it appears as plain text in the
Notes field in Outlook. Here is the code that I'm using:

oContact.Body = ActiveDocument.Range.Text

Is there a different way to paste (in RTF format) all of the text of a Word
Document into the Notes (Body) field of Outlook Contact Item?

John
Doug Robbins - Word MVP - 28 Aug 2006 20:57 GMT
Try

oContact.Body = ActiveDocument.Range.FormattedText

Signature

Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP

> Hello,
>
[quoted text clipped - 14 lines]
>
> John
John Riddle - 28 Aug 2006 22:17 GMT
Doug,

Thanks for your prompt response. However, that still didn't work. Still
looses all formatting. I mean the paragraphs and such are correct, but the
font, bold, italics, size, etc. are all lost.

Any other suggestions?

Thanks,

John

> Try
>
[quoted text clipped - 18 lines]
> >
> > John
Russ - 04 Sep 2006 19:39 GMT
See below.

> Doug,
>
[quoted text clipped - 19 lines]
>>> document
>>> to the Notes field in Outlook. A _manual copy/paste_ of a Word document's

Did you try using the clipboard with VBA's .copy and .paste methods?

>>> contents into the Notes field in Outlook preserves the RTF formatting.
>>> However, when I do this programmatically, it appears as plain text in the
[quoted text clipped - 7 lines]
>>>
>>> John

Signature

Russ

drsmN0SPAMikleAThotmailD0Tcom.INVALID

Russ - 04 Sep 2006 19:52 GMT
Another idea...
Does the notes field of Outlook allow for the insertion of a file like a
Word document allows for a insertion of a file? And it looks like a AutoText
entry can use the .insert method to preserve formatting. I normally use
Entourage on a Mac, so I can't test Outlook at home.

> See below.
>
[quoted text clipped - 35 lines]
>>>>
>>>> John

Signature

Russ

drsmN0SPAMikleAThotmailD0Tcom.INVALID

Russ - 04 Sep 2006 20:08 GMT
Even more obvious, I suppose. Have you tried posting the question in an
Outlook newsgroup, who should be more familiar with the limitations of
Outlook Notes.

> Another idea...
> Does the notes field of Outlook allow for the insertion of a file like a
[quoted text clipped - 41 lines]
>>>>>
>>>>> John

Signature

Russ

drsmN0SPAMikleAThotmailD0Tcom.INVALID

Russ - 04 Sep 2006 20:40 GMT
I also see that there is a .pastespecial method which can paste from the
clipboard as rtf.
Maybe there is a way to add a note by actually pointing to and opening up a
Word document as the body of the note.

> Even more obvious, I suppose. Have you tried posting the question in an
> Outlook newsgroup, who should be more familiar with the limitations of
[quoted text clipped - 45 lines]
>>>>>>
>>>>>> John

Signature

Russ

drsmN0SPAMikleAThotmailD0Tcom.INVALID

 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.