![]() |
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. |
|
|
|
Thread Tools | Search this Thread | Display Modes |
#1
|
|||
|
|||
![]()
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 |
#2
|
|||
|
|||
![]()
What's the nature of the problem? Where is the form published?
-- Sue Mosher, Outlook MVP Author of Configuring Microsoft Outlook 2003 http://www.turtleflock.com/olconfig/index.htm and Microsoft Outlook Programming - Jumpstart for Administrators, Power Users, and Developers http://www.outlookcode.com/jumpstart.aspx wrote in message oups.com... 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 |
#3
|
|||
|
|||
![]()
Hi Sue
The form is an .oft at present. The code breaks whenever I try to send the form to the Approver, using the 'cmdsendPCa_Click()' function on a button. Does that help? Thanks Darryl |
#4
|
|||
|
|||
![]()
I get this error message:
"There must be at least one name or distribution list in the To, Cc or Bcc box" Thanks Darryl |
#5
|
|||
|
|||
![]()
By default no code runs on items created with .oft form templates. You must publish the form.
-- Sue Mosher, Outlook MVP Author of Configuring Microsoft Outlook 2003 http://www.turtleflock.com/olconfig/index.htm and Microsoft Outlook Programming - Jumpstart for Administrators, Power Users, and Developers http://www.outlookcode.com/jumpstart.aspx wrote in message oups.com... Hi Sue The form is an .oft at present. The code breaks whenever I try to send the form to the Approver, using the 'cmdsendPCa_Click()' function on a button. Does that help? Thanks Darryl |
#6
|
|||
|
|||
![]()
THis is normal behavior when the Send command is executed if there are no recipients yet.
-- Sue Mosher, Outlook MVP Author of Configuring Microsoft Outlook 2003 http://www.turtleflock.com/olconfig/index.htm and Microsoft Outlook Programming - Jumpstart for Administrators, Power Users, and Developers http://www.outlookcode.com/jumpstart.aspx wrote in message oups.com... I get this error message: "There must be at least one name or distribution list in the To, Cc or Bcc box" Thanks Darryl |
#7
|
|||
|
|||
![]()
Sue
I anticipated your response, and published the form, but it still didn;t work. The first route function works, until I add the routeb function. Any ideas? Thanks Darryl |
#8
|
|||
|
|||
![]()
Where did you publish the form?
-- Sue Mosher, Outlook MVP Author of Configuring Microsoft Outlook 2003 http://www.turtleflock.com/olconfig/index.htm and Microsoft Outlook Programming - Jumpstart for Administrators, Power Users, and Developers http://www.outlookcode.com/jumpstart.aspx wrote in message ups.com... Sue I anticipated your response, and published the form, but it still didn;t work. The first route function works, until I add the routeb function. Any ideas? Thanks Darryl |
#9
|
|||
|
|||
![]()
Hi Sue
I published the form to my inbox, and to Personal Forms Library. Neither worked. Thanks Darryl |
#10
|
|||
|
|||
![]()
That's the problem. For a message form that has code behind it to work properly, everyone must have access to the published form. Accomplish this by publishing it in the Organizational Forms library on Exchange or to every person's Personal Forms library.
-- Sue Mosher, Outlook MVP Author of Configuring Microsoft Outlook 2003 http://www.turtleflock.com/olconfig/index.htm and Microsoft Outlook Programming - Jumpstart for Administrators, Power Users, and Developers http://www.outlookcode.com/jumpstart.aspx wrote in message ups.com... Hi Sue I published the form to my inbox, and to Personal Forms Library. Neither worked. Thanks Darryl |
|
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
forwarding vcard | lvinson | Outlook - Using Contacts | 1 | March 7th 06 09:59 AM |
OL2003 - can you auto-fill a singel new contact form with online form data | TimR | Outlook - Using Contacts | 1 | February 15th 06 01:43 PM |
Outlook opens Form as Email message, not Form | [email protected] | Outlook - General Queries | 2 | January 26th 06 09:54 PM |
I send an Outlook custom form, but a std. form displays? | Sue Mosher [MVP-Outlook] | Outlook - Using Forms | 0 | January 20th 06 07:41 PM |
how to display a form for the user to select a list of contacts from the addressbook | LeAnne | Outlook - General Queries | 0 | January 8th 06 12:55 PM |