View Single Post
  #1  
Old January 27th 06, 04:47 PM posted to microsoft.public.outlook.program_forms
[email protected]
external usenet poster
 
Posts: 6
Default Forwarding a form from one user to another

Hello

I have created an Outlook form which I want to be:

1. Completed by a user
2. Forwarded to an approver
3. Then Forwarded to an administrator
4. Then Forwarded to another person

I seem to be hitting problems whenever I add a second send routine. Can
anyone help? Here is the code:

Option Explicit
'Forward to approver function
Function Item_CustomAction(ByVal Action, ByVal NewItem)
Select Case Action.Name
Case "Route"
Item_CustomAction = True
NewItem.To = "Approver1"
Case Else
Item_CustomAction = True
End Select
End Function
'The first send action
sub cmdsendPCa_Click()

Item.Actions.item("Route").Execute
Item.Close 1

end sub

'Forward to administrator function
Function Item_CustomAction(ByVal Action, ByVal NewItem)
Select Case Action.Name
Case "Routeb"
Item_CustomAction = True
NewItem.To = "Adminstrator"
Case Else
Item_CustomAction = True
End Select
End Function

'The second send action
sub cmdsendPCb_Click()

Item.Actions.item("Routeb").Execute
Item.Close 1

end sub

Hope you can help

Ads