A Microsoft Outlook email forum. Outlook Banter

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » Outlook Banter forum » Microsoft Outlook Email Newsgroups » Outlook - Using Forms
Site Map Home Register Authors List Search Today's Posts Mark Forums Read Web Partners

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



 
 
Thread Tools Search this Thread Display Modes
  #1  
Old October 19th 07, 05:44 PM posted to microsoft.public.outlook.program_forms
Oskar Vaia
external usenet poster
 
Posts: 29
Default Exchange 2003/Outlook 2003: VBScript-Error in personalized form

Hi,

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").Contro ls("LabelMB1").Visible =
True
item.userproperties("aktMahnstufe").Value = "1"
Getinspector.ModifiedFormPages("Inkassi").Controls ("CommandButton6").Caption
= "2. Mahnstufe"
Mahnbrieferstellung
Case "2. Mahnstufe"
item.userproperties("Mahnung2").Value = True
item.userproperties("MB2").Value = date
Item.GetInspector.ModifiedFormPages("Test").Contro ls("LabelMB2").Visible =
True
item.userproperties("aktMahnstufe").Value = "2"
GetInspector.ModifiedFormPages("Inkassi").Controls ("CommandButton6").Caption
= "3. Mahnstufe"
Mahnbrieferstellung
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").Contro ls("LabelMB1").Visible =
True

thx & bye

Oskar

  #2  
Old October 19th 07, 07:00 PM posted to microsoft.public.outlook.program_forms
Sue Mosher [MVP-Outlook]
external usenet poster
 
Posts: 11,651
Default Exchange 2003/Outlook 2003: VBScript-Error in personalized form

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.
--
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 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").Contro ls("LabelMB1").Visible =
True
item.userproperties("aktMahnstufe").Value = "1"
Getinspector.ModifiedFormPages("Inkassi").Controls ("CommandButton6").Caption
= "2. Mahnstufe"
Mahnbrieferstellung
Case "2. Mahnstufe"
item.userproperties("Mahnung2").Value = True
item.userproperties("MB2").Value = date
Item.GetInspector.ModifiedFormPages("Test").Contro ls("LabelMB2").Visible =
True
item.userproperties("aktMahnstufe").Value = "2"
GetInspector.ModifiedFormPages("Inkassi").Controls ("CommandButton6").Caption
= "3. Mahnstufe"
Mahnbrieferstellung
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").Contro ls("LabelMB1").Visible =
True

thx & bye

Oskar

  #3  
Old October 20th 07, 08:49 AM posted to microsoft.public.outlook.program_forms
Oskar Vaia
external usenet poster
 
Posts: 29
Default Exchange 2003/Outlook 2003: VBScript-Error in personalized form

Hi Sue,

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

Look he
---
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

 




Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Exchange 2007 with Outlook 2003 mail profile error Kaddie Outlook - Installation 0 October 12th 07 07:36 AM
Outlook 2003 custom form fields not accessible to Exchange Server Ade_kcc Outlook - General Queries 6 July 16th 07 05:24 PM
Outlook 2003 calendar form error ryoung Outlook - Calandaring 1 May 14th 07 02:53 PM
Outlook 2003 VBscript.dll error DianeC Outlook - Installation 3 April 5th 07 12:04 PM
Digital ID name not found error in Outlook 2003 w/ Exchange 2000 Brian Tillman Outlook - General Queries 5 August 11th 06 03:36 PM


All times are GMT +1. The time now is 12:37 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.Search Engine Friendly URLs by vBSEO 2.4.0
Copyright ©2004-2025 Outlook Banter.
The comments are property of their posters.