View Single Post
  #6   Report Post  
Max Moor
 
Posts: n/a
Default

"Greg" wrote in news:1116245707.750799.283430
@g47g2000cwa.googlegroups.com:

Max

I have been following your posts to try to pick up tips. I just
started dabbling in Word VBA are year or so ago and still have lots to
learn. How did you ever figure out to use the "(2)'" at the end of the
Split statement to return the value that you wanted? I searched the
VBA help and found no similiar example. Is this something that you
knew from your experience in other programs?



Hi Greg,
Yes, I knew that from my Access trials. Split returns a string
array, and the (2) is just an index to it... a shortcut, since I only care
about the '_Refxxx' anyway. More often than not, I'd declare a variable to
dump the array into:

Dim avarOpenArgs As Variant

If (Not IsNull(Me.OpenArgs)) Then

avarOpenArgs = Split(Me.OpenArgs, "\")

...


-TTFN