Exchange 2003/Outlook 2003: VBScript-Error in personalized form


Oskar Vaia


i'm developing a new personalized taskform.
The form has worked without problems until today morning.

Now on passing the follow code-section
sub commandbutton6_click()
Dim CB5Caption
CB5Source = 1

Select Case CB5Caption
Case "1. Mahnstufe"
item.userproperties("Mahnung1").Value = True
item.userproperties("MB1").Value = date
item.GetInspector.ModifiedFormPages("Test").Controls("LabelMB1").Visible =
item.userproperties("aktMahnstufe").Value = "1"
= "2. Mahnstufe"
Case "2. Mahnstufe"
item.userproperties("Mahnung2").Value = True
item.userproperties("MB2").Value = date
Item.GetInspector.ModifiedFormPages("Test").Controls("LabelMB2").Visible =
item.userproperties("aktMahnstufe").Value = "2"
= "3. Mahnstufe"
End Select

CB5Source = 0
Item.Close olSave
end sub

i receive the following error

Objekt required: '[object]'

In the debugger the error said something like this:

Microsoft Office Outlook: You don't have the necessary authorization to
achieve the operation.

I simply did not understand why the code surprisedly doesn't work, if until
tomorrow it worked without problems.
Can someone please help me to resolve this problem, before i get crazy? ;-)

The error comes on this position:
item.GetInspector.ModifiedFormPages("Test").Controls("LabelMB1").Visible =

thx & bye


Sue Mosher [MVP-Outlook]

That statement contains references two objects. Is there a page named Test visible on the form in run mode? A control named LabelMB1 on that page? A good troubleshooting practice would involve rewriting that statement into two statements, with only one object variable returned in each, so you can know for certain which one is causing the problem.

Oskar Vaia

Hi Sue,

thx for your tip.
I have found the error and it was so a stupid error.

Look here:
Sub Item_CustomPropertyChange(ByVal Name)
if CB5Source = 0 then

Dim RetMsgBox
Select Case Name
Case "Mahnung1"
.... End Select
end if
item.close 0
end sub

I have set the "item.close 0"-command on the wrong position and so my item
were always closed.

thx very much for your good tip!

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