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

Program data into the "To, Cc and Introduction" fields



 
 
Thread Tools Search this Thread Display Modes
  #1  
Old January 30th 08, 03:36 AM posted to microsoft.public.outlook.program_vba
smar
external usenet poster
 
Posts: 2
Default Program data into the "To, Cc and Introduction" fields

I am in MS Word 2003 and I select the E-Mail icon on the Toolbar. It brings
up the
Outlook 2003 "To:..., Cc..., Subject: and Introduction:" fields at the top
of the Word document, along with some of the Outlook toolbar icons.

I want add some code a MS Word macro to insert email addresses into the To:
and Cc: fields, instead of typing them in over and over. I would some
appreciate sample code. I tried using the MS Word group with no luck, so I
am trying the Outlook group
Ads
  #2  
Old January 30th 08, 05:53 AM posted to microsoft.public.outlook.program_vba
Michael Bauer [MVP - Outlook]
external usenet poster
 
Posts: 1,885
Default Program data into the "To, Cc and Introduction" fields


You can use this sample for Outlook, not word:
http://www.vboffice.net/sample.html?...cmd=showite m

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

Am Tue, 29 Jan 2008 19:36:00 -0800 schrieb smar:

I am in MS Word 2003 and I select the E-Mail icon on the Toolbar. It

brings
up the
Outlook 2003 "To:..., Cc..., Subject: and Introduction:" fields at the top
of the Word document, along with some of the Outlook toolbar icons.

I want add some code a MS Word macro to insert email addresses into the

To:
and Cc: fields, instead of typing them in over and over. I would some
appreciate sample code. I tried using the MS Word group with no luck, so

I
am trying the Outlook group

  #3  
Old January 30th 08, 04:28 PM posted to microsoft.public.outlook.program_vba
Sue Mosher [MVP-Outlook]
external usenet poster
 
Posts: 11,651
Default Program data into the "To, Cc and Introduction" fields

Try this Word macro:

Sub AddInfoToMsg()
Dim env As Office.MsoEnvelope
Set env = ActiveDocument.MailEnvelope
With env
.Introduction = "My introduction"
.Item.To = "
.Item.cc = "
End With
Set env = Nothing
End Sub

--
Sue Mosher, Outlook MVP
Author of Microsoft Outlook 2007 Programming:
Jumpstart for Power Users and Administrators
http://www.outlookcode.com/article.aspx?id=54


"smar" wrote in message ...
I am in MS Word 2003 and I select the E-Mail icon on the Toolbar. It brings
up the
Outlook 2003 "To:..., Cc..., Subject: and Introduction:" fields at the top
of the Word document, along with some of the Outlook toolbar icons.

I want add some code a MS Word macro to insert email addresses into the To:
and Cc: fields, instead of typing them in over and over. I would some
appreciate sample code. I tried using the MS Word group with no luck, so I
am trying the Outlook group

  #4  
Old January 30th 08, 06:01 PM posted to microsoft.public.outlook.program_vba
smar
external usenet poster
 
Posts: 2
Default Program data into the "To, Cc and Introduction" fields

Many thanks for the program code, it worked GREAT...

"Sue Mosher [MVP-Outlook]" wrote:

Try this Word macro:

Sub AddInfoToMsg()
Dim env As Office.MsoEnvelope
Set env = ActiveDocument.MailEnvelope
With env
.Introduction = "My introduction"
.Item.To = "
.Item.cc = "
End With
Set env = Nothing
End Sub

--
Sue Mosher, Outlook MVP
Author of Microsoft Outlook 2007 Programming:
Jumpstart for Power Users and Administrators
http://www.outlookcode.com/article.aspx?id=54


"smar" wrote in message ...
I am in MS Word 2003 and I select the E-Mail icon on the Toolbar. It brings
up the
Outlook 2003 "To:..., Cc..., Subject: and Introduction:" fields at the top
of the Word document, along with some of the Outlook toolbar icons.

I want add some code a MS Word macro to insert email addresses into the To:
and Cc: fields, instead of typing them in over and over. I would some
appreciate sample code. I tried using the MS Word group with no luck, so I
am trying the Outlook group


 




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
CANNOT EDIT "TO" "CC" & "SUBJECT" FIELDS...HELP! DJDeals.com Outlook Express 3 November 8th 07 02:59 AM
draft e-mails not printing "to" and "subject" fields Jianni Outlook - Using Forms 0 May 2nd 07 09:51 AM
"Calendar" and "Calendar1" - How to move the data? Dana W. Outlook - Calandaring 0 March 17th 07 02:24 AM
Outlook export "modified" and "Notes" Fields dano Outlook and VBA 3 February 14th 07 02:22 PM
Cannot "Open" "Import/Export' or use "Data File Management" Ed Isenberg Outlook - Installation 3 July 16th 06 12:31 AM


All times are GMT +1. The time now is 06:08 AM.


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.