![]() |
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. |
|
|
Thread Tools | Search this Thread | Display Modes |
#1
|
|||
|
|||
![]()
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
|
|||
|
|||
![]()
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
|
|||
|
|||
![]()
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
|
|||
|
|||
![]()
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
|
|||
|
|||
![]()
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 |
Display Modes | |
|
|
![]() |
||||
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 |