Hi,
If in my document , 4th line contains the following text,
RE: 65 Spear Street,Metuchen,NY
How to parse, so that i get "65 Spear Street,Metuchen,NY" into a variable
which i can use in the file name to save the document?
Thanks for your help.
Regards,
Adi
Jezebel - 26 Nov 2006 06:48 GMT
MyVar = mid$(ActiveDocument.Paragraphs(4).Range, 10)
> Hi,
> If in my document , 4th line contains the following text,
[quoted text clipped - 7 lines]
> Regards,
> Adi
Adi - 26 Nov 2006 16:53 GMT
Jezebel,
Thanks. It worked for me. Just for curiosity what does mid$ do?
> MyVar = mid$(ActiveDocument.Paragraphs(4).Range, 10)
>
[quoted text clipped - 9 lines]
> > Regards,
> > Adi
Doug Robbins - Word MVP - 26 Nov 2006 17:30 GMT
I suggest that you look up the function in the help file. In this case, it
returns the content of the fourth paragraph starting at the 10th character,
there being six non-breaking space and one ordinary space after the RE:

Signature
Hope this helps.
Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.
Doug Robbins - Word MVP
> Jezebel,
> Thanks. It worked for me. Just for curiosity what does mid$ do?
[quoted text clipped - 13 lines]
>> > Regards,
>> > Adi