-----Original Message-----
I tried the new syntax and get the error "Microsoft
VBScript runtime error: Object Required:'pgReport'
The problem is that inadvertantly yesterday I must have
done something that made it not have this error but now
it has returned.
The original problem that made me even look at this code
is that when it runs the code with large amounts of data
it comes up with an error. Then when I go into debug it
shows the item equalling Nothing. This code works
perfectly fine on Outlook 2000, but in 2003 it dies out.
Are there settings in Outlook 2003 that I should be
looking at??
Please help - I am on a deadline and I have never touched
Outlook Forms before yesterday.
Also that part I was talking about the 2-CurrentForm -
that is when you choose Form from the Menu Bar and then
Advanced Properties... from the dropdown. cycle is one of
the advanced properties of the form.
Thanks
-----Original Message-----
I did find 2-CurrentForm in the advanced property of
cycle on 2 of the forms and I changed that to 0- AllForms -
and then it ran ok and I could publish successfully and
it runs without error.
I don't understand what you are referring to here.
The error comes right at the defining of the controls in
this piece of code:
Set pgReport = Item.GetInspector.ModifiedFormPages
Set label1 = pgReport("REPORT").Controls ("label1")
The one form is named REPORT. The error comes on the
second line. How can I get this to be more stable.
The syntax above is incorrect. Try:
Set pgReport = Item.GetInspector.ModifiedFormPages ("REPORT")
Set label1 = pgReport.Controls ("label1")
--
Sue Mosher, Outlook MVP
Outlook and Exchange solutions at
http://www.slipstick.com
Author of
Microsoft Outlook Programming: Jumpstart
for Administrators, Power Users, and Developers