Outlook 2003: check if control does exist (VBScript)

O

Oskar Vaia

Hi,

i'm develop a new taskform.
On the item_open-event i need to check if a control exist or not. How can i
accomplish this?

thanks & bye

Oskar
 
S

Sue Mosher [MVP-Outlook]

Function Item_Open()
On Error Resume Next
Set pg = Item.GetInspector.ModifiedFormPages("My page")
Set ctrl = pg.Controls("My control")
If Not ctrl Is Nothing Then
' the control exists
Else
' it doesn't exist
End If
End Function

See http://www.outlookcode.com/article.aspx?ID=38 for more on Outlook property and control syntax.
 
O

Oskar Vaia

Hi Sue,

now i have seen, that with this method i only check if the control exists.
What have i to do, if i want to verify if the bind field to a control does
already exist in the store or not?

bye

Oskar
 
O

Oskar Vaia

Hi Sue,

i have resolved my problem with the control of the field-value for the value
#1/1/4501#.
I think this is the right way. What do you mean?

bye

Oskar
 
S

Sue Mosher [MVP-Outlook]

Sorry, but I don't know what you are referring to when you ask "what do you mean?"
 
O

Oskar Vaia

Hi Sue,
Sorry, but I don't know what you are referring to when you ask "what do you
mean?"

i refer to the problem for check if a field does already exists in the store
or not.
i do this with the check of the field-value <> #1/1/4501#.

thx & bye

Oskar
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top