Retrieving Value

G

Guest

Greetings,
My worksheet uses Routing and I would like to pull the Routing Recepients
names off of the routing slip and put them somewhere on the worksheet to
everyone can see who the worksheet will be routed to. I have read the help
file on this, but I am a little confused. Below is what Help says. I would
just like code to retreive the routing recipients. I think my code should be
something like:
Names = ThisWorkbook.RoutingSlip.Recepients, but I am confused.

help please.....

Syntax
expression.Recipients(Index)
expression Required. An expression that returns a RoutingSlip object.
Index Optional Variant. The recipient. If this argument isn’t specified,
the Recipients property returns (or can be set to) an array that contains all
recipients.
Remarks
The order of the recipient list defines the delivery order if the routing
delivery option is xlOneAfterAnother.
If a routing slip is in progress, only those recipients who haven’t already
received and routed the document are returned or set.
 
D

Dick Kusleika

Jeff

I wouldn't use Names as it's a reserved word and you probably don't need a
variable anyway.

Dim i As Long

With ThisWorkbook.RoutingSlip.Recipients
For i = 1 to .Count
Sheet1.Cells(i,1).Value = .Item(i)
Next i
End With

Untested, but I think it will work.
 
G

Guest

Hi Dick,
Thank you for the code. Unfortantely, it is not working. I would welcome
any other suggestions please. Thank you in advance.
Jeff
 
T

Tom Ogilvy

Sub AAABB()
Dim myNames As Variant
Dim rw As Long
myNames = ThisWorkbook.RoutingSlip.Recipients()
rw = 10
For i = LBound(myNames) To UBound(myNames)
Cells(rw, "Z").Value = myNames(i)
rw = rw + 1
Next

End Sub
 

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