| |
swedburj
Posts: 1
Score: 0
Joined: 4/1/2003
From:
Status: offline
|
I'm getting some strange reactions to what I'm trying. I am just a beginner with this language so.... it's my fault. But why is this not working? It does what I expect for the fullname field but will only fill in that one value I can't get a second value to work. That is except for a plain text value in the jobtile control. But even plain text doesn't seem to work in other controls. Am I going about creating a new contact based on a custom form the wrong way? Any help much appreciated! CODE: Option Explicit 'sub procedure to fire on "Create Contact button" 'produces a standard outlook contact based on values in 'an open custom task sub cmdNewContact_Click() Dim objNewContact 'new contact object Dim objPages 'custom task form object Dim objCorePage 'Core Information page in custom task form Set objNewContact = Application.CreateItem(2) 'the 2 denotes contact item Set objPages = Item.GetInspector.ModifiedFormPages Set objCorePage = objPages("Core information") With objNewContact ' .Company = objCorePage.Controls("Company Name Textbox").Value .FullName = objCorePage.Controls("Company Contact Person Textbox").Value ' .JobTitle = objCorePage.Controls("Company Contact Person Position Textb").Value .JobTitle = "another test" ' .Company = "why won't this one work" .Display End With End Sub
|
|