PC Review


Reply
Thread Tools Rate Thread

Custom Forms script error

 
 
Bryan Dickerson
Guest
Posts: n/a
 
      3rd Jun 2005
I'm trying to disable a command bar that has occassionally caused problems
in a custom form. I came up with this routine:

Sub SetCmdBars(ByVal boolVal)
Dim oF
Dim oCB

Set oF = Item.GetInspector
For Each oCB in oF.CommandBars
If oCB.Name = "Standard" Then
oCB.Enabled = boolVal
oCB.Visible = boolVal
End If
Next
oF.CommandBars("View").Enabled = boolVal
oF.CommandBars("Tools").Enabled = boolVal
oF.CommandBars("Actions").Enabled = boolVal
End Sub

.... and some users are getting the error message:
"You don't have appropriate permission to perform this operation." and the
line number points to the script code line: "Set oF = Item.GetInspector".

Anyone have any ideas?

Thanx!


--
TFWBWY...A


 
Reply With Quote
 
 
 
 
=?Utf-8?B?RXJpYyBMZWdhdWx0IFtNVlAgLSBPdXRsb29rXQ==
Guest
Posts: n/a
 
      3rd Jun 2005
Where is the code that declares the Item object?

It obviously sounds like a permissions problem; does the user have read
access to the folder that contains the Item you are setting a reference to?

--
Eric Legault - B.A, MCP, MCSD, Outlook MVP
Try Picture Attachments Wizard for Outlook! http://tinyurl.com/9bby8
Job: http://www.imaginets.com
Blog: http://blogs.officezealot.com/legault/


"Bryan Dickerson" wrote:

> I'm trying to disable a command bar that has occassionally caused problems
> in a custom form. I came up with this routine:
>
> Sub SetCmdBars(ByVal boolVal)
> Dim oF
> Dim oCB
>
> Set oF = Item.GetInspector
> For Each oCB in oF.CommandBars
> If oCB.Name = "Standard" Then
> oCB.Enabled = boolVal
> oCB.Visible = boolVal
> End If
> Next
> oF.CommandBars("View").Enabled = boolVal
> oF.CommandBars("Tools").Enabled = boolVal
> oF.CommandBars("Actions").Enabled = boolVal
> End Sub
>
> .... and some users are getting the error message:
> "You don't have appropriate permission to perform this operation." and the
> line number points to the script code line: "Set oF = Item.GetInspector".
>
> Anyone have any ideas?
>
> Thanx!
>
>
> --
> TFWBWY...A
>
>
>

 
Reply With Quote
 
Bryan Dickerson
Guest
Posts: n/a
 
      3rd Jun 2005
Item refers to the Outlook Task Item that is available to the script when it
runs. Since this form runs in a folder where each user has rights to create
and alter most anything about the individual tasks, I would have to assume
(I know dangerous) that the user could modify the Item object. But that may
be a very faulty assumption. Are there any docs that you could point me to?

"Eric Legault [MVP - Outlook]" <(E-Mail Removed)> wrote in
message news:A919FB85-119C-4CA6-B089-(E-Mail Removed)...
> Where is the code that declares the Item object?
>
> It obviously sounds like a permissions problem; does the user have read
> access to the folder that contains the Item you are setting a reference
> to?
>
> --
> Eric Legault - B.A, MCP, MCSD, Outlook MVP
> Try Picture Attachments Wizard for Outlook! http://tinyurl.com/9bby8
> Job: http://www.imaginets.com
> Blog: http://blogs.officezealot.com/legault/
>
>
> "Bryan Dickerson" wrote:
>
>> I'm trying to disable a command bar that has occassionally caused
>> problems
>> in a custom form. I came up with this routine:
>>
>> Sub SetCmdBars(ByVal boolVal)
>> Dim oF
>> Dim oCB
>>
>> Set oF = Item.GetInspector
>> For Each oCB in oF.CommandBars
>> If oCB.Name = "Standard" Then
>> oCB.Enabled = boolVal
>> oCB.Visible = boolVal
>> End If
>> Next
>> oF.CommandBars("View").Enabled = boolVal
>> oF.CommandBars("Tools").Enabled = boolVal
>> oF.CommandBars("Actions").Enabled = boolVal
>> End Sub
>>
>> .... and some users are getting the error message:
>> "You don't have appropriate permission to perform this operation." and
>> the
>> line number points to the script code line: "Set oF = Item.GetInspector".
>>
>> Anyone have any ideas?
>>
>> Thanx!
>>
>>
>> --
>> TFWBWY...A
>>
>>
>>



 
Reply With Quote
 
=?Utf-8?B?RXJpYyBMZWdhdWx0IFtNVlAgLSBPdXRsb29rXQ==
Guest
Posts: n/a
 
      3rd Jun 2005
Sorry - I didn't realize you were talking about a custom form, where of
course the Item object is intrinsic!

I can't imagine why you'd get a permissions error on retrieving the
Inspector object, even if the user only had read permissions - nothing is
getting modified, and you can't really alter an item from the Inspector
object anyway.

You might want to verify the permissions for those users who are receiving
these errors, and note their Outlook version as well. Otherwise, I'm stumped.

--
Eric Legault - B.A, MCP, MCSD, Outlook MVP
Try Picture Attachments Wizard for Outlook! http://tinyurl.com/9bby8
Job: http://www.imaginets.com
Blog: http://blogs.officezealot.com/legault/


"Bryan Dickerson" wrote:

> Item refers to the Outlook Task Item that is available to the script when it
> runs. Since this form runs in a folder where each user has rights to create
> and alter most anything about the individual tasks, I would have to assume
> (I know dangerous) that the user could modify the Item object. But that may
> be a very faulty assumption. Are there any docs that you could point me to?
>
> "Eric Legault [MVP - Outlook]" <(E-Mail Removed)> wrote in
> message news:A919FB85-119C-4CA6-B089-(E-Mail Removed)...
> > Where is the code that declares the Item object?
> >
> > It obviously sounds like a permissions problem; does the user have read
> > access to the folder that contains the Item you are setting a reference
> > to?
> >
> > --
> > Eric Legault - B.A, MCP, MCSD, Outlook MVP
> > Try Picture Attachments Wizard for Outlook! http://tinyurl.com/9bby8
> > Job: http://www.imaginets.com
> > Blog: http://blogs.officezealot.com/legault/
> >
> >
> > "Bryan Dickerson" wrote:
> >
> >> I'm trying to disable a command bar that has occassionally caused
> >> problems
> >> in a custom form. I came up with this routine:
> >>
> >> Sub SetCmdBars(ByVal boolVal)
> >> Dim oF
> >> Dim oCB
> >>
> >> Set oF = Item.GetInspector
> >> For Each oCB in oF.CommandBars
> >> If oCB.Name = "Standard" Then
> >> oCB.Enabled = boolVal
> >> oCB.Visible = boolVal
> >> End If
> >> Next
> >> oF.CommandBars("View").Enabled = boolVal
> >> oF.CommandBars("Tools").Enabled = boolVal
> >> oF.CommandBars("Actions").Enabled = boolVal
> >> End Sub
> >>
> >> .... and some users are getting the error message:
> >> "You don't have appropriate permission to perform this operation." and
> >> the
> >> line number points to the script code line: "Set oF = Item.GetInspector".
> >>
> >> Anyone have any ideas?
> >>
> >> Thanx!
> >>
> >>
> >> --
> >> TFWBWY...A
> >>
> >>
> >>

>
>
>

 
Reply With Quote
 
Bryan Dickerson
Guest
Posts: n/a
 
      3rd Jun 2005
I just looked at the public folder whence the custom forms are being run.
The permissions are correct and there are no exceptions. Outlook version is
something I've been fighting hard for, but I'm fairly sure that all these
users are at OL 2003 SP1. That is the latest, right?

"Eric Legault [MVP - Outlook]" <(E-Mail Removed)> wrote in
message news:8900A341-A692-43DC-83AE-(E-Mail Removed)...
> Sorry - I didn't realize you were talking about a custom form, where of
> course the Item object is intrinsic!
>
> I can't imagine why you'd get a permissions error on retrieving the
> Inspector object, even if the user only had read permissions - nothing is
> getting modified, and you can't really alter an item from the Inspector
> object anyway.
>
> You might want to verify the permissions for those users who are receiving
> these errors, and note their Outlook version as well. Otherwise, I'm
> stumped.
>
> --
> Eric Legault - B.A, MCP, MCSD, Outlook MVP
> Try Picture Attachments Wizard for Outlook! http://tinyurl.com/9bby8
> Job: http://www.imaginets.com
> Blog: http://blogs.officezealot.com/legault/
>
>
> "Bryan Dickerson" wrote:
>
>> Item refers to the Outlook Task Item that is available to the script when
>> it
>> runs. Since this form runs in a folder where each user has rights to
>> create
>> and alter most anything about the individual tasks, I would have to
>> assume
>> (I know dangerous) that the user could modify the Item object. But that
>> may
>> be a very faulty assumption. Are there any docs that you could point me
>> to?
>>
>> "Eric Legault [MVP - Outlook]" <(E-Mail Removed)> wrote in
>> message news:A919FB85-119C-4CA6-B089-(E-Mail Removed)...
>> > Where is the code that declares the Item object?
>> >
>> > It obviously sounds like a permissions problem; does the user have read
>> > access to the folder that contains the Item you are setting a reference
>> > to?
>> >
>> > --
>> > Eric Legault - B.A, MCP, MCSD, Outlook MVP
>> > Try Picture Attachments Wizard for Outlook! http://tinyurl.com/9bby8
>> > Job: http://www.imaginets.com
>> > Blog: http://blogs.officezealot.com/legault/
>> >
>> >
>> > "Bryan Dickerson" wrote:
>> >
>> >> I'm trying to disable a command bar that has occassionally caused
>> >> problems
>> >> in a custom form. I came up with this routine:
>> >>
>> >> Sub SetCmdBars(ByVal boolVal)
>> >> Dim oF
>> >> Dim oCB
>> >>
>> >> Set oF = Item.GetInspector
>> >> For Each oCB in oF.CommandBars
>> >> If oCB.Name = "Standard" Then
>> >> oCB.Enabled = boolVal
>> >> oCB.Visible = boolVal
>> >> End If
>> >> Next
>> >> oF.CommandBars("View").Enabled = boolVal
>> >> oF.CommandBars("Tools").Enabled = boolVal
>> >> oF.CommandBars("Actions").Enabled = boolVal
>> >> End Sub
>> >>
>> >> .... and some users are getting the error message:
>> >> "You don't have appropriate permission to perform this operation." and
>> >> the
>> >> line number points to the script code line: "Set oF =
>> >> Item.GetInspector".
>> >>
>> >> Anyone have any ideas?
>> >>
>> >> Thanx!
>> >>
>> >>
>> >> --
>> >> TFWBWY...A
>> >>
>> >>
>> >>

>>
>>
>>



 
Reply With Quote
 
=?Utf-8?B?RXJpYyBMZWdhdWx0IFtNVlAgLSBPdXRsb29rXQ==
Guest
Posts: n/a
 
      3rd Jun 2005
Yes, that's the latest version.

At what point are you calling this procedure? On Item_Open? Via a button?

--
Eric Legault - B.A, MCP, MCSD, Outlook MVP
Try Picture Attachments Wizard for Outlook! http://tinyurl.com/9bby8
Job: http://www.imaginets.com
Blog: http://blogs.officezealot.com/legault/


"Bryan Dickerson" wrote:

> I just looked at the public folder whence the custom forms are being run.
> The permissions are correct and there are no exceptions. Outlook version is
> something I've been fighting hard for, but I'm fairly sure that all these
> users are at OL 2003 SP1. That is the latest, right?
>
> "Eric Legault [MVP - Outlook]" <(E-Mail Removed)> wrote in
> message news:8900A341-A692-43DC-83AE-(E-Mail Removed)...
> > Sorry - I didn't realize you were talking about a custom form, where of
> > course the Item object is intrinsic!
> >
> > I can't imagine why you'd get a permissions error on retrieving the
> > Inspector object, even if the user only had read permissions - nothing is
> > getting modified, and you can't really alter an item from the Inspector
> > object anyway.
> >
> > You might want to verify the permissions for those users who are receiving
> > these errors, and note their Outlook version as well. Otherwise, I'm
> > stumped.
> >
> > --
> > Eric Legault - B.A, MCP, MCSD, Outlook MVP
> > Try Picture Attachments Wizard for Outlook! http://tinyurl.com/9bby8
> > Job: http://www.imaginets.com
> > Blog: http://blogs.officezealot.com/legault/
> >
> >
> > "Bryan Dickerson" wrote:
> >
> >> Item refers to the Outlook Task Item that is available to the script when
> >> it
> >> runs. Since this form runs in a folder where each user has rights to
> >> create
> >> and alter most anything about the individual tasks, I would have to
> >> assume
> >> (I know dangerous) that the user could modify the Item object. But that
> >> may
> >> be a very faulty assumption. Are there any docs that you could point me
> >> to?
> >>
> >> "Eric Legault [MVP - Outlook]" <(E-Mail Removed)> wrote in
> >> message news:A919FB85-119C-4CA6-B089-(E-Mail Removed)...
> >> > Where is the code that declares the Item object?
> >> >
> >> > It obviously sounds like a permissions problem; does the user have read
> >> > access to the folder that contains the Item you are setting a reference
> >> > to?
> >> >
> >> > --
> >> > Eric Legault - B.A, MCP, MCSD, Outlook MVP
> >> > Try Picture Attachments Wizard for Outlook! http://tinyurl.com/9bby8
> >> > Job: http://www.imaginets.com
> >> > Blog: http://blogs.officezealot.com/legault/
> >> >
> >> >
> >> > "Bryan Dickerson" wrote:
> >> >
> >> >> I'm trying to disable a command bar that has occassionally caused
> >> >> problems
> >> >> in a custom form. I came up with this routine:
> >> >>
> >> >> Sub SetCmdBars(ByVal boolVal)
> >> >> Dim oF
> >> >> Dim oCB
> >> >>
> >> >> Set oF = Item.GetInspector
> >> >> For Each oCB in oF.CommandBars
> >> >> If oCB.Name = "Standard" Then
> >> >> oCB.Enabled = boolVal
> >> >> oCB.Visible = boolVal
> >> >> End If
> >> >> Next
> >> >> oF.CommandBars("View").Enabled = boolVal
> >> >> oF.CommandBars("Tools").Enabled = boolVal
> >> >> oF.CommandBars("Actions").Enabled = boolVal
> >> >> End Sub
> >> >>
> >> >> .... and some users are getting the error message:
> >> >> "You don't have appropriate permission to perform this operation." and
> >> >> the
> >> >> line number points to the script code line: "Set oF =
> >> >> Item.GetInspector".
> >> >>
> >> >> Anyone have any ideas?
> >> >>
> >> >> Thanx!
> >> >>
> >> >>
> >> >> --
> >> >> TFWBWY...A
> >> >>
> >> >>
> >> >>
> >>
> >>
> >>

>
>
>

 
Reply With Quote
 
Bryan Dickerson
Guest
Posts: n/a
 
      3rd Jun 2005
I'm calling it in Item_Open
SetCmdBars False
.... and in Item_Close
SetCmdBars True.

And the users report that it's mostly on the SetCmdBars True call that they
are seeing the errors. I tried setting oF =
Item.GetInspector.ModifiedFormPages.Add("Ticket") (I'm not sure what that
does exactly, but it works to access the Custom Form User Properties) but it
only caused more errors.

"Eric Legault [MVP - Outlook]" <(E-Mail Removed)> wrote in
message news:E16D85B9-9CB0-433E-B316-(E-Mail Removed)...
> Yes, that's the latest version.
>
> At what point are you calling this procedure? On Item_Open? Via a
> button?
>
> --
> Eric Legault - B.A, MCP, MCSD, Outlook MVP
> Try Picture Attachments Wizard for Outlook! http://tinyurl.com/9bby8
> Job: http://www.imaginets.com
> Blog: http://blogs.officezealot.com/legault/
>
>
> "Bryan Dickerson" wrote:
>
>> I just looked at the public folder whence the custom forms are being run.
>> The permissions are correct and there are no exceptions. Outlook version
>> is
>> something I've been fighting hard for, but I'm fairly sure that all these
>> users are at OL 2003 SP1. That is the latest, right?
>>
>> "Eric Legault [MVP - Outlook]" <(E-Mail Removed)> wrote in
>> message news:8900A341-A692-43DC-83AE-(E-Mail Removed)...
>> > Sorry - I didn't realize you were talking about a custom form, where of
>> > course the Item object is intrinsic!
>> >
>> > I can't imagine why you'd get a permissions error on retrieving the
>> > Inspector object, even if the user only had read permissions - nothing
>> > is
>> > getting modified, and you can't really alter an item from the Inspector
>> > object anyway.
>> >
>> > You might want to verify the permissions for those users who are
>> > receiving
>> > these errors, and note their Outlook version as well. Otherwise, I'm
>> > stumped.
>> >
>> > --
>> > Eric Legault - B.A, MCP, MCSD, Outlook MVP
>> > Try Picture Attachments Wizard for Outlook! http://tinyurl.com/9bby8
>> > Job: http://www.imaginets.com
>> > Blog: http://blogs.officezealot.com/legault/
>> >
>> >
>> > "Bryan Dickerson" wrote:
>> >
>> >> Item refers to the Outlook Task Item that is available to the script
>> >> when
>> >> it
>> >> runs. Since this form runs in a folder where each user has rights to
>> >> create
>> >> and alter most anything about the individual tasks, I would have to
>> >> assume
>> >> (I know dangerous) that the user could modify the Item object. But
>> >> that
>> >> may
>> >> be a very faulty assumption. Are there any docs that you could point
>> >> me
>> >> to?
>> >>
>> >> "Eric Legault [MVP - Outlook]" <(E-Mail Removed)> wrote
>> >> in
>> >> message news:A919FB85-119C-4CA6-B089-(E-Mail Removed)...
>> >> > Where is the code that declares the Item object?
>> >> >
>> >> > It obviously sounds like a permissions problem; does the user have
>> >> > read
>> >> > access to the folder that contains the Item you are setting a
>> >> > reference
>> >> > to?
>> >> >
>> >> > --
>> >> > Eric Legault - B.A, MCP, MCSD, Outlook MVP
>> >> > Try Picture Attachments Wizard for Outlook! http://tinyurl.com/9bby8
>> >> > Job: http://www.imaginets.com
>> >> > Blog: http://blogs.officezealot.com/legault/
>> >> >
>> >> >
>> >> > "Bryan Dickerson" wrote:
>> >> >
>> >> >> I'm trying to disable a command bar that has occassionally caused
>> >> >> problems
>> >> >> in a custom form. I came up with this routine:
>> >> >>
>> >> >> Sub SetCmdBars(ByVal boolVal)
>> >> >> Dim oF
>> >> >> Dim oCB
>> >> >>
>> >> >> Set oF = Item.GetInspector
>> >> >> For Each oCB in oF.CommandBars
>> >> >> If oCB.Name = "Standard" Then
>> >> >> oCB.Enabled = boolVal
>> >> >> oCB.Visible = boolVal
>> >> >> End If
>> >> >> Next
>> >> >> oF.CommandBars("View").Enabled = boolVal
>> >> >> oF.CommandBars("Tools").Enabled = boolVal
>> >> >> oF.CommandBars("Actions").Enabled = boolVal
>> >> >> End Sub
>> >> >>
>> >> >> .... and some users are getting the error message:
>> >> >> "You don't have appropriate permission to perform this operation."
>> >> >> and
>> >> >> the
>> >> >> line number points to the script code line: "Set oF =
>> >> >> Item.GetInspector".
>> >> >>
>> >> >> Anyone have any ideas?
>> >> >>
>> >> >> Thanx!
>> >> >>
>> >> >>
>> >> >> --
>> >> >> TFWBWY...A
>> >> >>
>> >> >>
>> >> >>
>> >>
>> >>
>> >>

>>
>>
>>



 
Reply With Quote
 
Bryan Dickerson
Guest
Posts: n/a
 
      3rd Jun 2005
So can you not set properties of Item.GetInspector if you don't have a
certain authorization?

"Bryan Dickerson" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> I'm calling it in Item_Open
> SetCmdBars False
> ... and in Item_Close
> SetCmdBars True.
>
> And the users report that it's mostly on the SetCmdBars True call that
> they are seeing the errors. I tried setting oF =
> Item.GetInspector.ModifiedFormPages.Add("Ticket") (I'm not sure what that
> does exactly, but it works to access the Custom Form User Properties) but
> it only caused more errors.
>
> "Eric Legault [MVP - Outlook]" <(E-Mail Removed)> wrote in
> message news:E16D85B9-9CB0-433E-B316-(E-Mail Removed)...
>> Yes, that's the latest version.
>>
>> At what point are you calling this procedure? On Item_Open? Via a
>> button?
>>
>> --
>> Eric Legault - B.A, MCP, MCSD, Outlook MVP
>> Try Picture Attachments Wizard for Outlook! http://tinyurl.com/9bby8
>> Job: http://www.imaginets.com
>> Blog: http://blogs.officezealot.com/legault/
>>
>>
>> "Bryan Dickerson" wrote:
>>
>>> I just looked at the public folder whence the custom forms are being
>>> run.
>>> The permissions are correct and there are no exceptions. Outlook
>>> version is
>>> something I've been fighting hard for, but I'm fairly sure that all
>>> these
>>> users are at OL 2003 SP1. That is the latest, right?
>>>
>>> "Eric Legault [MVP - Outlook]" <(E-Mail Removed)> wrote in
>>> message news:8900A341-A692-43DC-83AE-(E-Mail Removed)...
>>> > Sorry - I didn't realize you were talking about a custom form, where
>>> > of
>>> > course the Item object is intrinsic!
>>> >
>>> > I can't imagine why you'd get a permissions error on retrieving the
>>> > Inspector object, even if the user only had read permissions - nothing
>>> > is
>>> > getting modified, and you can't really alter an item from the
>>> > Inspector
>>> > object anyway.
>>> >
>>> > You might want to verify the permissions for those users who are
>>> > receiving
>>> > these errors, and note their Outlook version as well. Otherwise, I'm
>>> > stumped.
>>> >
>>> > --
>>> > Eric Legault - B.A, MCP, MCSD, Outlook MVP
>>> > Try Picture Attachments Wizard for Outlook! http://tinyurl.com/9bby8
>>> > Job: http://www.imaginets.com
>>> > Blog: http://blogs.officezealot.com/legault/
>>> >
>>> >
>>> > "Bryan Dickerson" wrote:
>>> >
>>> >> Item refers to the Outlook Task Item that is available to the script
>>> >> when
>>> >> it
>>> >> runs. Since this form runs in a folder where each user has rights to
>>> >> create
>>> >> and alter most anything about the individual tasks, I would have to
>>> >> assume
>>> >> (I know dangerous) that the user could modify the Item object. But
>>> >> that
>>> >> may
>>> >> be a very faulty assumption. Are there any docs that you could point
>>> >> me
>>> >> to?
>>> >>
>>> >> "Eric Legault [MVP - Outlook]" <(E-Mail Removed)> wrote
>>> >> in
>>> >> message news:A919FB85-119C-4CA6-B089-(E-Mail Removed)...
>>> >> > Where is the code that declares the Item object?
>>> >> >
>>> >> > It obviously sounds like a permissions problem; does the user have
>>> >> > read
>>> >> > access to the folder that contains the Item you are setting a
>>> >> > reference
>>> >> > to?
>>> >> >
>>> >> > --
>>> >> > Eric Legault - B.A, MCP, MCSD, Outlook MVP
>>> >> > Try Picture Attachments Wizard for Outlook!
>>> >> > http://tinyurl.com/9bby8
>>> >> > Job: http://www.imaginets.com
>>> >> > Blog: http://blogs.officezealot.com/legault/
>>> >> >
>>> >> >
>>> >> > "Bryan Dickerson" wrote:
>>> >> >
>>> >> >> I'm trying to disable a command bar that has occassionally caused
>>> >> >> problems
>>> >> >> in a custom form. I came up with this routine:
>>> >> >>
>>> >> >> Sub SetCmdBars(ByVal boolVal)
>>> >> >> Dim oF
>>> >> >> Dim oCB
>>> >> >>
>>> >> >> Set oF = Item.GetInspector
>>> >> >> For Each oCB in oF.CommandBars
>>> >> >> If oCB.Name = "Standard" Then
>>> >> >> oCB.Enabled = boolVal
>>> >> >> oCB.Visible = boolVal
>>> >> >> End If
>>> >> >> Next
>>> >> >> oF.CommandBars("View").Enabled = boolVal
>>> >> >> oF.CommandBars("Tools").Enabled = boolVal
>>> >> >> oF.CommandBars("Actions").Enabled = boolVal
>>> >> >> End Sub
>>> >> >>
>>> >> >> .... and some users are getting the error message:
>>> >> >> "You don't have appropriate permission to perform this operation."
>>> >> >> and
>>> >> >> the
>>> >> >> line number points to the script code line: "Set oF =
>>> >> >> Item.GetInspector".
>>> >> >>
>>> >> >> Anyone have any ideas?
>>> >> >>
>>> >> >> Thanx!
>>> >> >>
>>> >> >>
>>> >> >> --
>>> >> >> TFWBWY...A
>>> >> >>
>>> >> >>
>>> >> >>
>>> >>
>>> >>
>>> >>
>>>
>>>
>>>

>
>



 
Reply With Quote
 
=?Utf-8?B?RXJpYyBMZWdhdWx0IFtNVlAgLSBPdXRsb29rXQ==
Guest
Posts: n/a
 
      3rd Jun 2005
An Inspector object doesn't directly expose the properties of the underlying
Outlook item, whether Task, Contact, e-mail, etc. It's basically a wrapper
for the form that displays the content, with properties for window size,
caption, etc. - the "window dressing".

Also, you don't really need to re-enable the commandbars when the item
closes - Outlook resets the commandbars whenever the next item opens - so you
can get rid of the code in the Item_Close event.

The ModifiedFormPages method is mainly used to retrieve the Controls
collection for a particular page on your custom form. You can always access
custom fields through the Item.UserProperties collection.

Regardless, just include some error handling to bypass this error anyway:

Sub SetCmdBars(ByVal boolVal)
On Error Resume Next

Dim oF
Dim oCB

Set oF = Item.GetInspector
If Err.Number <> 0 Then Exit Sub 'Problem!
For Each oCB in oF.CommandBars
If oCB.Name = "Standard" Then
oCB.Enabled = boolVal
oCB.Visible = boolVal
End If
Next
oF.CommandBars("View").Enabled = boolVal
oF.CommandBars("Tools").Enabled = boolVal
oF.CommandBars("Actions").Enabled = boolVal
End Sub


--
Eric Legault - B.A, MCP, MCSD, Outlook MVP
Try Picture Attachments Wizard for Outlook! http://tinyurl.com/9bby8
Job: http://www.imaginets.com
Blog: http://blogs.officezealot.com/legault/


"Bryan Dickerson" wrote:

> So can you not set properties of Item.GetInspector if you don't have a
> certain authorization?
>
> "Bryan Dickerson" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
> > I'm calling it in Item_Open
> > SetCmdBars False
> > ... and in Item_Close
> > SetCmdBars True.
> >
> > And the users report that it's mostly on the SetCmdBars True call that
> > they are seeing the errors. I tried setting oF =
> > Item.GetInspector.ModifiedFormPages.Add("Ticket") (I'm not sure what that
> > does exactly, but it works to access the Custom Form User Properties) but
> > it only caused more errors.
> >
> > "Eric Legault [MVP - Outlook]" <(E-Mail Removed)> wrote in
> > message news:E16D85B9-9CB0-433E-B316-(E-Mail Removed)...
> >> Yes, that's the latest version.
> >>
> >> At what point are you calling this procedure? On Item_Open? Via a
> >> button?
> >>
> >> --
> >> Eric Legault - B.A, MCP, MCSD, Outlook MVP
> >> Try Picture Attachments Wizard for Outlook! http://tinyurl.com/9bby8
> >> Job: http://www.imaginets.com
> >> Blog: http://blogs.officezealot.com/legault/
> >>
> >>
> >> "Bryan Dickerson" wrote:
> >>
> >>> I just looked at the public folder whence the custom forms are being
> >>> run.
> >>> The permissions are correct and there are no exceptions. Outlook
> >>> version is
> >>> something I've been fighting hard for, but I'm fairly sure that all
> >>> these
> >>> users are at OL 2003 SP1. That is the latest, right?
> >>>
> >>> "Eric Legault [MVP - Outlook]" <(E-Mail Removed)> wrote in
> >>> message news:8900A341-A692-43DC-83AE-(E-Mail Removed)...
> >>> > Sorry - I didn't realize you were talking about a custom form, where
> >>> > of
> >>> > course the Item object is intrinsic!
> >>> >
> >>> > I can't imagine why you'd get a permissions error on retrieving the
> >>> > Inspector object, even if the user only had read permissions - nothing
> >>> > is
> >>> > getting modified, and you can't really alter an item from the
> >>> > Inspector
> >>> > object anyway.
> >>> >
> >>> > You might want to verify the permissions for those users who are
> >>> > receiving
> >>> > these errors, and note their Outlook version as well. Otherwise, I'm
> >>> > stumped.
> >>> >
> >>> > --
> >>> > Eric Legault - B.A, MCP, MCSD, Outlook MVP
> >>> > Try Picture Attachments Wizard for Outlook! http://tinyurl.com/9bby8
> >>> > Job: http://www.imaginets.com
> >>> > Blog: http://blogs.officezealot.com/legault/
> >>> >
> >>> >
> >>> > "Bryan Dickerson" wrote:
> >>> >
> >>> >> Item refers to the Outlook Task Item that is available to the script
> >>> >> when
> >>> >> it
> >>> >> runs. Since this form runs in a folder where each user has rights to
> >>> >> create
> >>> >> and alter most anything about the individual tasks, I would have to
> >>> >> assume
> >>> >> (I know dangerous) that the user could modify the Item object. But
> >>> >> that
> >>> >> may
> >>> >> be a very faulty assumption. Are there any docs that you could point
> >>> >> me
> >>> >> to?
> >>> >>
> >>> >> "Eric Legault [MVP - Outlook]" <(E-Mail Removed)> wrote
> >>> >> in
> >>> >> message news:A919FB85-119C-4CA6-B089-(E-Mail Removed)...
> >>> >> > Where is the code that declares the Item object?
> >>> >> >
> >>> >> > It obviously sounds like a permissions problem; does the user have
> >>> >> > read
> >>> >> > access to the folder that contains the Item you are setting a
> >>> >> > reference
> >>> >> > to?
> >>> >> >
> >>> >> > --
> >>> >> > Eric Legault - B.A, MCP, MCSD, Outlook MVP
> >>> >> > Try Picture Attachments Wizard for Outlook!
> >>> >> > http://tinyurl.com/9bby8
> >>> >> > Job: http://www.imaginets.com
> >>> >> > Blog: http://blogs.officezealot.com/legault/
> >>> >> >
> >>> >> >
> >>> >> > "Bryan Dickerson" wrote:
> >>> >> >
> >>> >> >> I'm trying to disable a command bar that has occassionally caused
> >>> >> >> problems
> >>> >> >> in a custom form. I came up with this routine:
> >>> >> >>
> >>> >> >> Sub SetCmdBars(ByVal boolVal)
> >>> >> >> Dim oF
> >>> >> >> Dim oCB
> >>> >> >>
> >>> >> >> Set oF = Item.GetInspector
> >>> >> >> For Each oCB in oF.CommandBars
> >>> >> >> If oCB.Name = "Standard" Then
> >>> >> >> oCB.Enabled = boolVal
> >>> >> >> oCB.Visible = boolVal
> >>> >> >> End If
> >>> >> >> Next
> >>> >> >> oF.CommandBars("View").Enabled = boolVal
> >>> >> >> oF.CommandBars("Tools").Enabled = boolVal
> >>> >> >> oF.CommandBars("Actions").Enabled = boolVal
> >>> >> >> End Sub
> >>> >> >>
> >>> >> >> .... and some users are getting the error message:
> >>> >> >> "You don't have appropriate permission to perform this operation."
> >>> >> >> and
> >>> >> >> the
> >>> >> >> line number points to the script code line: "Set oF =
> >>> >> >> Item.GetInspector".
> >>> >> >>
> >>> >> >> Anyone have any ideas?
> >>> >> >>
> >>> >> >> Thanx!
> >>> >> >>
> >>> >> >>
> >>> >> >> --
> >>> >> >> TFWBWY...A
> >>> >> >>
> >>> >> >>
> >>> >> >>
> >>> >>
> >>> >>
> >>> >>
> >>>
> >>>
> >>>

> >
> >

>
>
>

 
Reply With Quote
 
Bryan Dickerson
Guest
Posts: n/a
 
      3rd Jun 2005
Thanx. I'll give it a whirl! I can just see the scowl on my boss' face
when I tell him the solution was: "On Error Resume Next"!!

"Eric Legault [MVP - Outlook]" <(E-Mail Removed)> wrote in
message news:3F40C02C-FDE6-42E8-9148-(E-Mail Removed)...
> An Inspector object doesn't directly expose the properties of the
> underlying
> Outlook item, whether Task, Contact, e-mail, etc. It's basically a
> wrapper
> for the form that displays the content, with properties for window size,
> caption, etc. - the "window dressing".
>
> Also, you don't really need to re-enable the commandbars when the item
> closes - Outlook resets the commandbars whenever the next item opens - so
> you
> can get rid of the code in the Item_Close event.
>
> The ModifiedFormPages method is mainly used to retrieve the Controls
> collection for a particular page on your custom form. You can always
> access
> custom fields through the Item.UserProperties collection.
>
> Regardless, just include some error handling to bypass this error anyway:
>
> Sub SetCmdBars(ByVal boolVal)
> On Error Resume Next
>
> Dim oF
> Dim oCB
>
> Set oF = Item.GetInspector
> If Err.Number <> 0 Then Exit Sub 'Problem!
> For Each oCB in oF.CommandBars
> If oCB.Name = "Standard" Then
> oCB.Enabled = boolVal
> oCB.Visible = boolVal
> End If
> Next
> oF.CommandBars("View").Enabled = boolVal
> oF.CommandBars("Tools").Enabled = boolVal
> oF.CommandBars("Actions").Enabled = boolVal
> End Sub
>
>
> --
> Eric Legault - B.A, MCP, MCSD, Outlook MVP
> Try Picture Attachments Wizard for Outlook! http://tinyurl.com/9bby8
> Job: http://www.imaginets.com
> Blog: http://blogs.officezealot.com/legault/
>
>
> "Bryan Dickerson" wrote:
>
>> So can you not set properties of Item.GetInspector if you don't have a
>> certain authorization?
>>
>> "Bryan Dickerson" <(E-Mail Removed)> wrote in message
>> news:(E-Mail Removed)...
>> > I'm calling it in Item_Open
>> > SetCmdBars False
>> > ... and in Item_Close
>> > SetCmdBars True.
>> >
>> > And the users report that it's mostly on the SetCmdBars True call that
>> > they are seeing the errors. I tried setting oF =
>> > Item.GetInspector.ModifiedFormPages.Add("Ticket") (I'm not sure what
>> > that
>> > does exactly, but it works to access the Custom Form User Properties)
>> > but
>> > it only caused more errors.
>> >
>> > "Eric Legault [MVP - Outlook]" <(E-Mail Removed)> wrote in
>> > message news:E16D85B9-9CB0-433E-B316-(E-Mail Removed)...
>> >> Yes, that's the latest version.
>> >>
>> >> At what point are you calling this procedure? On Item_Open? Via a
>> >> button?
>> >>
>> >> --
>> >> Eric Legault - B.A, MCP, MCSD, Outlook MVP
>> >> Try Picture Attachments Wizard for Outlook! http://tinyurl.com/9bby8
>> >> Job: http://www.imaginets.com
>> >> Blog: http://blogs.officezealot.com/legault/
>> >>
>> >>
>> >> "Bryan Dickerson" wrote:
>> >>
>> >>> I just looked at the public folder whence the custom forms are being
>> >>> run.
>> >>> The permissions are correct and there are no exceptions. Outlook
>> >>> version is
>> >>> something I've been fighting hard for, but I'm fairly sure that all
>> >>> these
>> >>> users are at OL 2003 SP1. That is the latest, right?
>> >>>
>> >>> "Eric Legault [MVP - Outlook]" <(E-Mail Removed)> wrote
>> >>> in
>> >>> message news:8900A341-A692-43DC-83AE-(E-Mail Removed)...
>> >>> > Sorry - I didn't realize you were talking about a custom form,
>> >>> > where
>> >>> > of
>> >>> > course the Item object is intrinsic!
>> >>> >
>> >>> > I can't imagine why you'd get a permissions error on retrieving the
>> >>> > Inspector object, even if the user only had read permissions -
>> >>> > nothing
>> >>> > is
>> >>> > getting modified, and you can't really alter an item from the
>> >>> > Inspector
>> >>> > object anyway.
>> >>> >
>> >>> > You might want to verify the permissions for those users who are
>> >>> > receiving
>> >>> > these errors, and note their Outlook version as well. Otherwise,
>> >>> > I'm
>> >>> > stumped.
>> >>> >
>> >>> > --
>> >>> > Eric Legault - B.A, MCP, MCSD, Outlook MVP
>> >>> > Try Picture Attachments Wizard for Outlook!
>> >>> > http://tinyurl.com/9bby8
>> >>> > Job: http://www.imaginets.com
>> >>> > Blog: http://blogs.officezealot.com/legault/
>> >>> >
>> >>> >
>> >>> > "Bryan Dickerson" wrote:
>> >>> >
>> >>> >> Item refers to the Outlook Task Item that is available to the
>> >>> >> script
>> >>> >> when
>> >>> >> it
>> >>> >> runs. Since this form runs in a folder where each user has rights
>> >>> >> to
>> >>> >> create
>> >>> >> and alter most anything about the individual tasks, I would have
>> >>> >> to
>> >>> >> assume
>> >>> >> (I know dangerous) that the user could modify the Item object.
>> >>> >> But
>> >>> >> that
>> >>> >> may
>> >>> >> be a very faulty assumption. Are there any docs that you could
>> >>> >> point
>> >>> >> me
>> >>> >> to?
>> >>> >>
>> >>> >> "Eric Legault [MVP - Outlook]" <(E-Mail Removed)>
>> >>> >> wrote
>> >>> >> in
>> >>> >> message news:A919FB85-119C-4CA6-B089-(E-Mail Removed)...
>> >>> >> > Where is the code that declares the Item object?
>> >>> >> >
>> >>> >> > It obviously sounds like a permissions problem; does the user
>> >>> >> > have
>> >>> >> > read
>> >>> >> > access to the folder that contains the Item you are setting a
>> >>> >> > reference
>> >>> >> > to?
>> >>> >> >
>> >>> >> > --
>> >>> >> > Eric Legault - B.A, MCP, MCSD, Outlook MVP
>> >>> >> > Try Picture Attachments Wizard for Outlook!
>> >>> >> > http://tinyurl.com/9bby8
>> >>> >> > Job: http://www.imaginets.com
>> >>> >> > Blog: http://blogs.officezealot.com/legault/
>> >>> >> >
>> >>> >> >
>> >>> >> > "Bryan Dickerson" wrote:
>> >>> >> >
>> >>> >> >> I'm trying to disable a command bar that has occassionally
>> >>> >> >> caused
>> >>> >> >> problems
>> >>> >> >> in a custom form. I came up with this routine:
>> >>> >> >>
>> >>> >> >> Sub SetCmdBars(ByVal boolVal)
>> >>> >> >> Dim oF
>> >>> >> >> Dim oCB
>> >>> >> >>
>> >>> >> >> Set oF = Item.GetInspector
>> >>> >> >> For Each oCB in oF.CommandBars
>> >>> >> >> If oCB.Name = "Standard" Then
>> >>> >> >> oCB.Enabled = boolVal
>> >>> >> >> oCB.Visible = boolVal
>> >>> >> >> End If
>> >>> >> >> Next
>> >>> >> >> oF.CommandBars("View").Enabled = boolVal
>> >>> >> >> oF.CommandBars("Tools").Enabled = boolVal
>> >>> >> >> oF.CommandBars("Actions").Enabled = boolVal
>> >>> >> >> End Sub
>> >>> >> >>
>> >>> >> >> .... and some users are getting the error message:
>> >>> >> >> "You don't have appropriate permission to perform this
>> >>> >> >> operation."
>> >>> >> >> and
>> >>> >> >> the
>> >>> >> >> line number points to the script code line: "Set oF =
>> >>> >> >> Item.GetInspector".
>> >>> >> >>
>> >>> >> >> Anyone have any ideas?
>> >>> >> >>
>> >>> >> >> Thanx!
>> >>> >> >>
>> >>> >> >>
>> >>> >> >> --
>> >>> >> >> TFWBWY...A
>> >>> >> >>
>> >>> >> >>
>> >>> >> >>
>> >>> >>
>> >>> >>
>> >>> >>
>> >>>
>> >>>
>> >>>
>> >
>> >

>>
>>
>>



 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Error opening custom forms Cal Microsoft Outlook Form Programming 4 24th Jan 2008 11:09 PM
Script Error in Custom Form Bryan Dickerson Microsoft Outlook Form Programming 5 18th Apr 2006 05:46 PM
Error on Custom Forms Bryan Dickerson Microsoft Outlook Form Programming 0 3rd Jun 2005 03:48 PM
Microsoft Forms/Script Error Darlene M Microsoft Outlook Contacts 1 14th Nov 2003 08:41 PM
VB Script in custom forms OL2002 AS Computer Microsoft Outlook Form Programming 0 17th Jul 2003 11:17 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 09:21 PM.