PDA

View Full Version : Routing Slip - Multiple Recipients/CC's?



bjsusol
01-22-2008, 04:48 PM
I have a macro I am editing for my firm. It currently is attached to a protected word document that when you click the "submit" button, it uses the routing function to email it to a particular user.

What I want to do is send it to multiple recipients for the first step of the routing. Or perhaps set a CC? Anyone know if this is possible thru VBA??

I suppose I could create a small mailing list and use that, but that seems an extreme way to do it.

fumei
01-23-2008, 04:16 AM
What have you tried so far?

bjsusol
01-23-2008, 06:08 AM
honestly, im not really too familiar with VBA, so not much

I was hoping I was just missing a line of code that I could add, this is a snippet of what I have. I want to add a CC or a second recipient so when the document is "submitted", it goes to Records AND a second recipient.


If ActiveDocument.ProtectionType = wdNoProtection Then
ActiveDocument.Protect Type:=wdAllowOnlyFormFields, NoReset:=True
End If
ActiveDocument.HasRoutingSlip = False
ActiveDocument.HasRoutingSlip = True
ActiveDocument.RoutingSlip.AddRecipient Recipient:="Records"
ActiveDocument.RoutingSlip.AddRecipient Recipient:="File Open Form"
ActiveDocument.RoutingSlip.AddRecipient Recipient:="Records"
With ActiveDocument
With .RoutingSlip
.Subject = ActiveDocument.FormFields("Client_Name").Result & " File Open Form"
.Message = ""
.Delivery = wdOneAfterAnother
.ReturnWhenDone = True
.TrackStatus = True
End With

fumei
01-23-2008, 11:31 AM
Well, as you did not include all your code, it is hard to tell, but you certainly have one instruction missing with what you posted.

.Route
ActiveDocument.HasRoutingSlip = False
ActiveDocument.HasRoutingSlip = True
ActiveDocument.RoutingSlip.AddRecipient Recipient:="Knight, Gerry "
ActiveDocument.RoutingSlip.AddRecipient Recipient:="Knight, Gerry [BC-YT]"
ActiveDocument.RoutingSlip.AddRecipient Recipient:="fumei@telus.net"
With ActiveDocument
With .RoutingSlip
.Protect = wdAllowOnlyComments
.Subject = "Yadda blah"
.Message = ""
.Delivery = wdOneAfterAnother
.ReturnWhenDone = True
.TrackStatus = False
End With
[b].Route
End With
End Sub worked for me.

bjsusol
01-23-2008, 03:57 PM
Unless I am reading both yours and my own code incorrectly, wont what you did just

submit - routes to Knight, Gerry [BC-YT]
click next routing recipient
routes AGAIN to Knight, Gerry [BC-YT]
click next routing recipient
routes to fumei@telus.net

what i am looking to do is something like this.

submit - routes to "emailaddie1" AND "emailaddie2"
click next routing recipient
routes to "emailaddie3"
click next routing recipient
routes back to "emailaddie1" AND "emailaddie2"

fumei
01-23-2008, 07:16 PM
I think I shall back away from this one. I am finding myself getting annoyed, and I do not want to post anything unpolite.

I'm sure someone else will be able to help you. Although I suggest you try and explain yourself better. Oh, and it is considered polite to mention when you cross post the same question on different forums.

bjsusol
01-23-2008, 07:48 PM
I do not know how to explain myself any better than I already have. I have a working piece of code that is basically just routes a document around. I asked if there was a way to set up multiple recipients/CC's... and in my last post I even mapped it out

1st route.. needs to go to email1 and email2
2nd route... needs to go to email3
3rd route... email1 and email2 again

The line ActiveDocument.RoutingSlip.AddRecipient Recipient:="Records" appears to set up a routing recipient, but I want to add a second address to that, or a CC to the email that is routed. I cannot seem to find a way to do so without creating another distribution list. If that is what I need to do, then so be it.

I apologize that you are getting annoyed, but to be honest, so am I.. so thats fine...Thanks for trying to assist.

I would apologize for cross posting, but I dont see why cross posting is such a big deal.. if everyone visited every single site, then why have two forums to begin with? If I received an answer, I would of happily posted it in the other location, but seeing I have not, I have not reposted in the other forum at all yet.

fumei
01-24-2008, 11:07 AM
There is nothing wrong with cross posting, but it is polite to mention it.

"and in my last post I even mapped it out

1st route.. needs to go to email1 and email2
2nd route... needs to go to email3
3rd route... email1 and email2 again"

You mapped it out did you?

Here is what you "mapped".

submit - routes to "emailaddie1" AND "emailaddie2"
click next routing recipient
routes to "emailaddie3"
click next routing recipient
routes back to "emailaddie1" AND "emailaddie2"

Do they look equivalent?

"then why have two forums to begin with?"

Ummm, excuse me? WHO has the two forums? What, you think there is one entity that has two forums? Actually...there are dozens of forums on Word/VBA/yadda yadda.

bjsusol
01-24-2008, 11:18 AM
*sigh*

im sorry you do not understand what I wrote.. Looking back again, I still dont see how I could of made it much clearer.... I said in the very beginning that I was submitting a document using routing.

and thank you for making my point entirely. with hundreds of forums out there, i am sorry i just happened to cross post on the two that you frequent.

so in the end, never mind I guess, I will just create a new distribution list to send to when I need to route to multiple recipients.

fumei
01-25-2008, 12:53 PM
OK, I will say this.

You are mixing up making a RoutingSlip with actually Routing. You still did not answer if you actually use

.Route

I do not know what you mean by:

routes back to "emailaddie1" AND "emailaddie2"

What does "routes back" mean? Does it mean send it again?

"I need to route to multiple recipients"

No, you can route to multiple recipients, but again, what does "route back" mean? It seems to not be multiple recipients, but the same recipients, and it is not at all clear if you are trying to send it again, that is, twice to the same recipients.

Good luck.

TonyJollans
01-27-2008, 06:02 AM
I'm not clear how you expect this to work. Routing is a serial process.

What do you want to happen when the recipient "emailaddie1" routes the document to recipient "emailaddie3"? Is the person at "emailaddie3" expected to know of the existence of the person at "emailaddie2" and wait for them as well? And then merge the two sets of changes?

fumei
01-28-2008, 06:13 AM
Glad I'm not the only one a bit confused. Although I wish I had the clarity of mind to use that simple statement: "Routing is a serial process."

Darn.