Reply
 
Thread Tools Display Modes
  #1   Report Post  
Posted to microsoft.public.word.mailmerge.fields
[email protected] jamiechen168@gmail.com is offline
external usenet poster
 
Posts: 6
Default Word Mail Merge to Outlook directly

Hello,

I am seeking a way to display the result document from the mail merge
to Outlook so that the user can do the final edit before sending out.
Below describes what I did generally in C# interop

1. Create a Word application object and execute the mail merge
2. Save the merged doc in HTML to a disk file.
3. Create an Outlook MailItem
4. Read the content from the disk file created in step 2 to a String
5. Assigned the string to the email body
6. Display the mail item

As you can see, I serialized it to a disk file and then read the HTML
source back. This is no good. I have done some research in terms of
better automation from Word to Outlook but no sucess.

My questions are
(1) Is there a way to read the HTML source from Word?
(2) Is there a better way to do the automation from Word to Outlook
without going through disk file?

Thanks in advance.

  #2   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Doug Robbins - Word MVP Doug Robbins - Word MVP is offline
external usenet poster
 
Posts: 8,832
Default Word Mail Merge to Outlook directly

You could use part of the method in the article "Mail Merge to E-mail with
Attachments" at:

http://word.mvps.org/FAQs/MailMerge/...ttachments.htm

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

wrote in message
ups.com...
Hello,

I am seeking a way to display the result document from the mail merge
to Outlook so that the user can do the final edit before sending out.
Below describes what I did generally in C# interop

1. Create a Word application object and execute the mail merge
2. Save the merged doc in HTML to a disk file.
3. Create an Outlook MailItem
4. Read the content from the disk file created in step 2 to a String
5. Assigned the string to the email body
6. Display the mail item

As you can see, I serialized it to a disk file and then read the HTML
source back. This is no good. I have done some research in terms of
better automation from Word to Outlook but no sucess.

My questions are
(1) Is there a way to read the HTML source from Word?
(2) Is there a better way to do the automation from Word to Outlook
without going through disk file?

Thanks in advance.



  #3   Report Post  
Posted to microsoft.public.word.mailmerge.fields
[email protected] jamiechen168@gmail.com is offline
external usenet poster
 
Posts: 6
Default Word Mail Merge to Outlook directly

Thanks for your reply, the solution of

MailItem.Body = wordDoc.Content will remove all formating which is the
problem. Is there a way to do this?

By the way, I am thinking of maybe I can use Interop to Copy+Paste. For
example, after the merge is done, I copy all content from Word and
paste all of them into Outlook. Can anyone refer me to some sample URL
that I can see how this can be done.

Thanks

Jamie

Doug Robbins - Word MVP wrote:
You could use part of the method in the article "Mail Merge to E-mail with
Attachments" at:

http://word.mvps.org/FAQs/MailMerge/...ttachments.htm

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

wrote in message
ups.com...
Hello,

I am seeking a way to display the result document from the mail merge
to Outlook so that the user can do the final edit before sending out.
Below describes what I did generally in C# interop

1. Create a Word application object and execute the mail merge
2. Save the merged doc in HTML to a disk file.
3. Create an Outlook MailItem
4. Read the content from the disk file created in step 2 to a String
5. Assigned the string to the email body
6. Display the mail item

As you can see, I serialized it to a disk file and then read the HTML
source back. This is no good. I have done some research in terms of
better automation from Word to Outlook but no sucess.

My questions are
(1) Is there a way to read the HTML source from Word?
(2) Is there a better way to do the automation from Word to Outlook
without going through disk file?

Thanks in advance.


  #4   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Doug Robbins - Word MVP Doug Robbins - Word MVP is offline
external usenet poster
 
Posts: 8,832
Default Word Mail Merge to Outlook directly

Of course you realise that spending any effort on formatting an HTML
mailmerge document could be futile as the recipient may choose the view all
of the emails as Plain Text.

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

wrote in message
oups.com...
Thanks for your reply, the solution of

MailItem.Body = wordDoc.Content will remove all formating which is the
problem. Is there a way to do this?

By the way, I am thinking of maybe I can use Interop to Copy+Paste. For
example, after the merge is done, I copy all content from Word and
paste all of them into Outlook. Can anyone refer me to some sample URL
that I can see how this can be done.

Thanks

Jamie

Doug Robbins - Word MVP wrote:
You could use part of the method in the article "Mail Merge to E-mail
with
Attachments" at:

http://word.mvps.org/FAQs/MailMerge/...ttachments.htm

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

wrote in message
ups.com...
Hello,

I am seeking a way to display the result document from the mail merge
to Outlook so that the user can do the final edit before sending out.
Below describes what I did generally in C# interop

1. Create a Word application object and execute the mail merge
2. Save the merged doc in HTML to a disk file.
3. Create an Outlook MailItem
4. Read the content from the disk file created in step 2 to a String
5. Assigned the string to the email body
6. Display the mail item

As you can see, I serialized it to a disk file and then read the HTML
source back. This is no good. I have done some research in terms of
better automation from Word to Outlook but no sucess.

My questions are
(1) Is there a way to read the HTML source from Word?
(2) Is there a better way to do the automation from Word to Outlook
without going through disk file?

Thanks in advance.




Reply
Thread Tools
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Word should catalog misspelled words to study. rndthought Microsoft Word Help 39 May 21st 23 02:47 AM
NO CODE - mail merge to Outlook with attachment with CC BrianH Mailmerge 1 February 10th 10 02:53 PM
Can't get Word 2003 to keep data file with mail merge main documen Yourcareercoach Mailmerge 9 August 10th 06 12:19 PM
Mail Merge (Word 2002 SP3)- Greg Mailmerge 3 March 15th 06 08:34 AM
Using Word Mail Merge feature for custom templates S.Sanghani Mailmerge 3 January 11th 06 10:22 AM


All times are GMT +1. The time now is 06:54 PM.

Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 Microsoft Office Word Forum - WordBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Word"