View Single Post
  #3  
Old February 6th 06, 09:38 AM posted to microsoft.public.outlook.program_forms
Michael Anderson
external usenet poster
 
Posts: 19
Default Get text from keyword Listbox

Sorry if my original code wasn't clear. I have slightly modified this but
still no joy:

As I said, I am working on a customised contact form. I have a keyword type
ListBox "ListBox3" with a field called "mxzNCRL2". It has 3 possible values:
Bunnings;Forklift;First Aid. I am trying to get the selected value or values
onto a text variable, "txtmxzNCRL2". No selected keyword prints out.
Supporting documentation doesn't discuss this.

Dim txtmxzNCRL2
Dim objInspector
Dim objPage

Set txtmxzNCRL2 = objPage.Controls("ListBox3")
Set fso = CreateObject("Scripting.FileSystemObject")
Set MyFile= fso.CreateTextFile("c:\testfile.txt", True)
Set objInspector = Item.GetInspector

MyFile.WriteLine(txtmxzNCRL2.Value)

MyFile.Close

--
Thank You in Advance,

Michael Anderson


"Hollis D. Paul" wrote:

In article ,
=?Utf-8?B?TWljaGFlbCBBbmRlcnNvbg==?= wrote:
txtmxzNCRL2 = Item.UserProperties("mxzNCRL2").Value

That line doesn't make a bit of sense to me.

Take a look at these pages and look for coding examples on
www.outlook-code.com and www.slipstick.com concerning listboxes.

To populate a combo box on a Microsoft Outlook form 8/9/2005
Microsoft Outlook VBScript code sample to populate a combo or list box
on an Outlook form using an ADO disconnected recordset
http://www.outlookcode.com/d/code/popcombobox.htm - 21 KB


TIP: To get help with Microsoft Outlook programming objects
8/9/2005
Tip on how to use the Object Browser as an index to get more
information on Outlook model objects
http://www.outlookcode.com/d/tips/gethelp.htm - 15 KB


Microsoft Outlook Developer Tips 8/9/2005
Tips for developing applications with Microsoft Outlook
http://www.outlookcode.com/d/tips.htm - 19 KB


Controls on Microsoft Outlook Custom Forms 8/18/2005
Tips, tricks and other resources for using controls on Microsoft
Outlook forms
http://www.outlookcode.com/d/formcontrols.htm - 34 KB

Hollis D. Paul [MVP - Outlook]
Mukilteo, WA USA




Ads