Outlook Banter

Outlook Banter (http://www.outlookbanter.com/)
-   Outlook - Using Forms (http://www.outlookbanter.com/outlook-using-forms/)
-   -   Outlook 2003: check if control does exist (VBScript) (http://www.outlookbanter.com/outlook-using-forms/58851-outlook-2003-check-if-control.html)

Oskar Vaia October 12th 07 05:45 PM

Outlook 2003: check if control does exist (VBScript)
 
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


Sue Mosher [MVP-Outlook] October 12th 07 06:01 PM

Outlook 2003: check if control does exist (VBScript)
 
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.

--
Sue Mosher, Outlook MVP
Author of Microsoft Outlook 2007 Programming:
Jumpstart for Power Users and Administrators
http://www.outlookcode.com/article.aspx?id=54


"Oskar Vaia" wrote in message ...
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


Oskar Vaia October 13th 07 08:05 AM

Outlook 2003: check if control does exist (VBScript)
 
Hi Sue,

thanks very much for your help.

bye

Oskar


Oskar Vaia October 13th 07 08:27 AM

Outlook 2003: check if control does exist (VBScript)
 
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


Oskar Vaia October 13th 07 10:53 AM

Outlook 2003: check if control does exist (VBScript)
 
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


Sue Mosher [MVP-Outlook] October 13th 07 03:52 PM

Outlook 2003: check if control does exist (VBScript)
 
Sorry, but I don't know what you are referring to when you ask "what do you mean?"

--
Sue Mosher, Outlook MVP
Author of Microsoft Outlook 2007 Programming:
Jumpstart for Power Users and Administrators
http://www.outlookcode.com/article.aspx?id=54


"Oskar Vaia" wrote in message ...
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


Sue Mosher [MVP-Outlook] October 13th 07 03:53 PM

Outlook 2003: check if control does exist (VBScript)
 
Exist in the folder's field definitions or exist in the item?

--
Sue Mosher, Outlook MVP
Author of Microsoft Outlook 2007 Programming:
Jumpstart for Power Users and Administrators
http://www.outlookcode.com/article.aspx?id=54


"Oskar Vaia" wrote in message ...
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


Oskar Vaia October 15th 07 02:47 PM

Outlook 2003: check if control does exist (VBScript)
 
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



All times are GMT +1. The time now is 06:11 AM.

Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 2.4.0
Copyright ©2004-2006 OutlookBanter.com