Photo Gallery Member List Search Calendars FAQ Ticket List Log Out


VBScript in Outlook 2000

 
Logged in as: Guest
arrSession:exec spGetSession 2,2,820
 Active Users: There are 0 members and 0 guests.
 Users viewing this topic: none
 

 

 
  
  Printable Version
All Forums >> [Scripting] >> WSH & Client Side VBScript >> VBScript in Outlook 2000
  Do you like VisualBasicScript.com? Link to us and help spread the word about our forum. Thanks!
Page: [1]
Login
Message << Older Topic   Newer Topic >>
 VBScript in Outlook 2000 - 4/1/2003 3:16:34 PM   
  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
 
 
Post #: 1
 
 
 
  

If you found our site useful please link to us <a href="http://www.visualbasicscript.com">VisualBasicScript.com</a>.
All Forums >> [Scripting] >> WSH & Client Side VBScript >> VBScript in Outlook 2000 Page: [1]
Jump to:





New Messages No New Messages
Hot Topic w/ New Messages Hot Topic w/o New Messages
Locked w/ New Messages Locked w/o New Messages
 Post New Thread
 Reply to Message
 Post New Poll
 Submit Vote
 Delete My Own Post
 Delete My Own Thread
 Rate Posts