Macro to active Menu Command of File>Send To>Routing Recipent

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hello,
I am very determined to get the routing to work. I am trying to eliminate
the need for the user to go to File>Send To>Routing Recipent by create a
macro to do this. I under the code to get to open the routing dialog box:

Application.Dialogs(xlDialogRoutingSlip).Show

The problem is that if I use this, it must skip something that links to the
users outlook. When I run the above code, it opens another dialog box that
asks the user to choose a profile. This will totally confuse my users. Is
there a way to have a macro do the commands of File>Send To>Routing Recipent?
The macro recorder does not for this...

Please help...I would welcome any suggestions to make this work. Thank you,
Mike
 
Try these.
Sub Tester1()
Dim btn As CommandBarButton
Set btn = CommandBars("File").Controls("Sen&d To") _
.Controls("&Routing Recipient...")
btn.Execute
End Sub

Sub Tester2()
Dim btn As CommandBarButton
Set btn = Application.CommandBars.FindControl(ID:=259)
btn.Execute
End Sub
 
This literally executes the command as you requested:

CommandBars("File").Controls("Send To").Controls("&Routing
Recipient...").Execute

However, this produced exactly the same result for me, running Excel 2003,
as your macro. I get a security warning about a program trying to access
Outlook either way. FWIW

--
Jim Rech
Excel MVP
| Hello,
| I am very determined to get the routing to work. I am trying to eliminate
| the need for the user to go to File>Send To>Routing Recipent by create a
| macro to do this. I under the code to get to open the routing dialog box:
|
| Application.Dialogs(xlDialogRoutingSlip).Show
|
| The problem is that if I use this, it must skip something that links to
the
| users outlook. When I run the above code, it opens another dialog box
that
| asks the user to choose a profile. This will totally confuse my users.
Is
| there a way to have a macro do the commands of File>Send To>Routing
Recipent?
| The macro recorder does not for this...
|
| Please help...I would welcome any suggestions to make this work. Thank
you,
| Mike
 

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

Back
Top