Outlook custom non-message based form try to post and forward

K

Kan Tong

i have created a outlook custom form in OL2002 using non-message based
form, when the user create a new form, the new item has been post to
the corresponding public folder successfully after hitting the "Post"
button with an empty "Item_Write" routine.

However, we would like to do the form post to the public folder AND
forward the form to a list of administrator for their approval,
therefore, I modify the "Item_Write" routine as follows:

Function Item_Write()
set newmail = item.Forward
newmail.To = [a list of admin users]
newmail.send
End Function

when hitting the "Post" button, it popup a "Script Error" on
"set newmail = item.Forward" saying "That action is not available for
this item", i have also try "item.Forwardvcard" (i forget the exact
wording now, but it's correct when the time that i try it), it comes up
the same error

Any help are welcome, thanks in advance
 
S

Sue Mosher [MVP-Outlook]

If it's not a message, what type of item is this? Does it have a Forward action on its (Actions) page.
 
K

Kan Tong

it's a IPM.post class item, it got a "Forward" action, i also try

Item.Actions("Forward").Execute

under "Item_write()", it does not have error, but no email forwarding
with post ok to the folder.

So the question is how to set the Forward action (or whatever custom
action), do i need another Form (IPM.note base or IPM.post base?) and
what should i set in the "Form action Properties" as well as how do i
define the email recipents.

thanks for your quick response!
 
S

Sue Mosher [MVP-Outlook]

But is the Forward action enabled or disabled? Your original code (added
below -- please quote *all* the relevant portion of previous messages) worked
fine here. The only scenario I can imagine where it wouldn't work would be if
you had disabled the FOrward action.
--
Sue Mosher, Outlook MVP
Author of Microsoft Outlook Programming: Jumpstart
for Administrators, Power Users, and Developers


Kan Tong said:
it's a IPM.post class item, it got a "Forward" action, i also try

Item.Actions("Forward").Execute

under "Item_write()", it does not have error, but no email forwarding
with post ok to the folder.

So the question is how to set the Forward action (or whatever custom
action), do i need another Form (IPM.note base or IPM.post base?) and
what should i set in the "Form action Properties" as well as how do i
define the email recipents.

thanks for your quick response!
Sue Mosher said:
If it's not a message, what type of item is this? Does it have a Forward action on its (Actions) page.
Kan Tong said:
i have created a outlook custom form in OL2002 using non-message based
form, when the user create a new form, the new item has been post to
the corresponding public folder successfully after hitting the "Post"
button with an empty "Item_Write" routine.

However, we would like to do the form post to the public folder AND
forward the form to a list of administrator for their approval,
therefore, I modify the "Item_Write" routine as follows:

Function Item_Write()
set newmail = item.Forward
newmail.To = [a list of admin users]
newmail.send
End Function

when hitting the "Post" button, it popup a "Script Error" on
"set newmail = item.Forward" saying "That action is not available for
this item"
 

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

Top