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 / December 2004

Tip: Looking for answers? Try searching our database.

Copy Text and Keep Formatting

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Jason Krug - 20 Dec 2004 17:23 GMT
Hello-

I have been working on a mailmerge.
I had the format working, but missed some functionality.
I now have VB script that provides the functionality, but I have now lost
the formatting!

The content copy line (.Body = ActiveDocument.Content) looses all formatting
in the email body.  Not only did I have BOLD and COLORED font, but I had a
Word TABLE of data.  That table is lost and the data is just listed as text.  
Is there a way to PRESERVE formatting in the body of the message? (having the
formatted text as an attachment is not an option)

To create the email, the VB script uses:
  Source.Sections.First.Range.Cut
   Documents.Add
   Selection.Paste
       .Subject = mysubject
       .Body = ActiveDocument.Content

Any suggestions!
I have a document of merged emails that I want to send one, at a time, to
the email recepients.

Thank you,
--Jason
Doug Robbins - Word MVP - 21 Dec 2004 11:49 GMT
Have you tried what I suggested in response to your question about this
issue in the microsoft.public.word.mailmerge.fields newsgroup?

Signature

Please post any further questions or followup to the newsgroups for the
benefit of others who may be interested.  Unsolicited questions forwarded
directly to me will only be answered on a paid consulting basis.

Hope this helps
Doug Robbins - Word MVP

> Hello-
>
[quoted text clipped - 22 lines]
> Thank you,
> --Jason
Jason Krug - 21 Dec 2004 21:05 GMT
Doug-

I did not know you would be working this gruop as well.

1) Email List with Separate Tables: When I perform the Merge to New
Document, the Mailmerge inserts Section Breaks between rows which makes them
separate tables.  I do not see a way to get rid of them other than manually
deleting the section breaks?

2) I just tried both methods.
       '.Body = ActiveDocument.Content
  This is actually even worse.  All text is streamed with no carriage
returns.
       .BodyFormat = olFormatRichText
       .Body = ActiveDocument.Content
  This method produces the same results.

I thought the formatting gruop would be a better bet than the outlook group?
Still want me to try over there?

Thank you for your continued-help.
--Jason

PS: Is there a way to make this multiple email address limitation an
enhanement in the next patch?  If it is a valid email address, this should
not be blocked.

> Have you tried what I suggested in response to your question about this
> issue in the microsoft.public.word.mailmerge.fields newsgroup?
[quoted text clipped - 28 lines]
> > Thank you,
> > --Jason
Doug Robbins - Word MVP - 22 Dec 2004 10:40 GMT
Yes I would still suggest Outlook as it's in the Outlook area that the
problem is occuring.

Signature

Please post any further questions or followup to the newsgroups for the
benefit of others who may be interested.  Unsolicited questions forwarded
directly to me will only be answered on a paid consulting basis.

Hope this helps
Doug Robbins - Word MVP

> Doug-
>
[quoted text clipped - 55 lines]
> > > Thank you,
> > > --Jason
 
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.