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 - Using Forms
Site Map Home Register Authors List Search Today's Posts Mark Forums Read Web Partners

Initial Value of Recipient Field



 
 
Thread Tools Search this Thread Display Modes
  #1  
Old October 23rd 06, 07:59 PM posted to microsoft.public.outlook.program_forms
Dorci
external usenet poster
 
Posts: 13
Default Initial Value of Recipient Field

I have a combo box on a custom email form, offering a choice of 4 names. I
have the initial value of the CC field set to equal the name selected in the
combo box. With "calculate this formula automatically" selected, the name
populates the CC field as it should, but you cannot add any other names; they
just disappear when you do. With "calculate...when I compose a new form"
selected, you can add other names, but it does fill in the initial name from
the combo box.

Is there a way to set an initial value in the CC field AND add more names at
runtime, if desired?

Thanks in advance,
Dorci
Ads
  #2  
Old October 23rd 06, 08:58 PM posted to microsoft.public.outlook.program_forms
Sue Mosher [MVP-Outlook]
external usenet poster
 
Posts: 11,651
Default Initial Value of Recipient Field

Think about your scenario: There is no "initial value" available to apply because the user has not yet selected any name from the combo box.

The solution, therefore, is to put code behind the form to add a new recipient using the Item.Recipients.Add method when the user makes a choice from the combo box. See http://www.outlookcode.com/d/propsyntax.htm
--
Sue Mosher, Outlook MVP
Author of Configuring Microsoft Outlook 2003
http://www.turtleflock.com/olconfig/index.htm
and Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers
http://www.outlookcode.com/jumpstart.aspx

"Dorci" wrote in message ...
I have a combo box on a custom email form, offering a choice of 4 names. I
have the initial value of the CC field set to equal the name selected in the
combo box. With "calculate this formula automatically" selected, the name
populates the CC field as it should, but you cannot add any other names; they
just disappear when you do. With "calculate...when I compose a new form"
selected, you can add other names, but it does fill in the initial name from
the combo box.

Is there a way to set an initial value in the CC field AND add more names at
runtime, if desired?

Thanks in advance,
Dorci

  #3  
Old October 24th 06, 10:16 PM posted to microsoft.public.outlook.program_forms
Dorci
external usenet poster
 
Posts: 13
Default Initial Value of Recipient Field

Yes, I understand why it happens; I was just hoping for a workaround. I've
programmed a lot in Access, but this is my first time programming an Outlook
form. I'm guessing the code you're suggesting is:

CC.Add(varName) 'where varName is the value selected in the combo
box.

If that is correct, where exactly would I place this code?

"Sue Mosher [MVP-Outlook]" wrote:

Think about your scenario: There is no "initial value" available to apply because the user has not yet selected any name from the combo box.

The solution, therefore, is to put code behind the form to add a new recipient using the Item.Recipients.Add method when the user makes a choice from the combo box. See http://www.outlookcode.com/d/propsyntax.htm
--
Sue Mosher, Outlook MVP
Author of Configuring Microsoft Outlook 2003
http://www.turtleflock.com/olconfig/index.htm
and Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers
http://www.outlookcode.com/jumpstart.aspx

"Dorci" wrote in message ...
I have a combo box on a custom email form, offering a choice of 4 names. I
have the initial value of the CC field set to equal the name selected in the
combo box. With "calculate this formula automatically" selected, the name
populates the CC field as it should, but you cannot add any other names; they
just disappear when you do. With "calculate...when I compose a new form"
selected, you can add other names, but it does fill in the initial name from
the combo box.

Is there a way to set an initial value in the CC field AND add more names at
runtime, if desired?

Thanks in advance,
Dorci


  #4  
Old October 24th 06, 10:28 PM posted to microsoft.public.outlook.program_forms
Dorci
external usenet poster
 
Posts: 13
Default Initial Value of Recipient Field

Nevermind. I didn't see the link you provided below. I'll check that out
first and see how far I get. Thanks for your response.

"Dorci" wrote:

Yes, I understand why it happens; I was just hoping for a workaround. I've
programmed a lot in Access, but this is my first time programming an Outlook
form. I'm guessing the code you're suggesting is:

CC.Add(varName) 'where varName is the value selected in the combo
box.

If that is correct, where exactly would I place this code?

"Sue Mosher [MVP-Outlook]" wrote:

Think about your scenario: There is no "initial value" available to apply because the user has not yet selected any name from the combo box.

The solution, therefore, is to put code behind the form to add a new recipient using the Item.Recipients.Add method when the user makes a choice from the combo box. See http://www.outlookcode.com/d/propsyntax.htm
--
Sue Mosher, Outlook MVP
Author of Configuring Microsoft Outlook 2003
http://www.turtleflock.com/olconfig/index.htm
and Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers
http://www.outlookcode.com/jumpstart.aspx

"Dorci" wrote in message ...
I have a combo box on a custom email form, offering a choice of 4 names. I
have the initial value of the CC field set to equal the name selected in the
combo box. With "calculate this formula automatically" selected, the name
populates the CC field as it should, but you cannot add any other names; they
just disappear when you do. With "calculate...when I compose a new form"
selected, you can add other names, but it does fill in the initial name from
the combo box.

Is there a way to set an initial value in the CC field AND add more names at
runtime, if desired?

Thanks in advance,
Dorci


  #5  
Old October 24th 06, 10:32 PM posted to microsoft.public.outlook.program_forms
Sue Mosher [MVP-Outlook]
external usenet poster
 
Posts: 11,651
Default Initial Value of Recipient Field

Where the code goes depends on *when* you want the new recipient to be added. I don't have a clear picture of whether you expect the user to employ the combo box to add multiple names or just one. Other crucial information would be whether the combo box is bound to an Outlook property and if so, what property. The page I suggested earlier covers most of the possible cases.

BTW, the object browser is your friend: Press ALt+F11 to open the VBA environment in Outlook, then press F2. Switch from All Libraries to Outlook to browse all Outlook objects and their properties, methods, and events. Select any object or member, then press F1 to see its Help topic. You'll see there's no such thing as CC.Add and that the method is as I had it -- Recipients.Add

--
Sue Mosher, Outlook MVP
Author of Configuring Microsoft Outlook 2003
http://www.turtleflock.com/olconfig/index.htm
and Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers
http://www.outlookcode.com/jumpstart.aspx

"Dorci" wrote in message ...
Yes, I understand why it happens; I was just hoping for a workaround. I've
programmed a lot in Access, but this is my first time programming an Outlook
form. I'm guessing the code you're suggesting is:

CC.Add(varName) 'where varName is the value selected in the combo
box.

If that is correct, where exactly would I place this code?

"Sue Mosher [MVP-Outlook]" wrote:

Think about your scenario: There is no "initial value" available to apply because the user has not yet selected any name from the combo box.

The solution, therefore, is to put code behind the form to add a new recipient using the Item.Recipients.Add method when the user makes a choice from the combo box. See http://www.outlookcode.com/d/propsyntax.htm



"Dorci" wrote in message ...
I have a combo box on a custom email form, offering a choice of 4 names. I
have the initial value of the CC field set to equal the name selected in the
combo box. With "calculate this formula automatically" selected, the name
populates the CC field as it should, but you cannot add any other names; they
just disappear when you do. With "calculate...when I compose a new form"
selected, you can add other names, but it does fill in the initial name from
the combo box.

Is there a way to set an initial value in the CC field AND add more names at
runtime, if desired?

Thanks in advance,
Dorci


 




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
Set initial value From field to %USERNAME%? LarsRotterdam Outlook - Using Forms 4 October 10th 06 04:55 PM
Copy First Recipient to a Field adubb Outlook - Using Forms 1 May 16th 06 04:56 PM
User Defined Field Initial Value Matt Outlook and VBA 1 May 6th 06 07:54 AM
Maintain form when recipient forwards to another recipient Holly Utzinger Outlook - Using Forms 3 May 5th 06 12:40 AM
initial field webguy Outlook Express 1 February 18th 06 10:32 PM


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


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.