Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Outlook Form - Combo Box (vbscript) 1

Status
Not open for further replies.

BenChristian

IS-IT--Management
Jan 11, 2004
193
AU
I'm trying to populate combox box values on an outlook form but I need commas in the actual values i.e "lastname1, firstname1;lastname2, firstname2". The problem is that it reads both commas and semicolons as seperators. I tried using the following script:

Sub Item_Open()

Set FormPage = Item.GetInspector.ModifiedFormPages("P.2")
Set Control = FormPage.Controls("ListBox1")
Control.PossibleValues = "Lastname1, Firstname1;Lastname2, FirstName2"

End Sub

Does anyone know how to identify a comma as part of the text value instead of a separator? Any assistance/suggestions are much appreciated :)

Thanks.
 
Hello sonicyouth108,

Use additem method instead.
Code:
    with Control
        .AddItem "Lastname1, Firstname1"
        .AddItem "Lastname2, Firstname2"
    end with
If you insists of the _dissuaded_ method, try escape it like:
Control.PossibleValues = "Lastname1\, Firstname1;Lastname2\, FirstName2"

regards - tsuji
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top