View Single Post
  #2  
Old October 12th 07, 06:01 PM posted to microsoft.public.outlook.program_forms
Sue Mosher [MVP-Outlook]
external usenet poster
 
Posts: 11,651
Default 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

Ads