Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Word / Programming / November 2006

Tip: Looking for answers? Try searching our database.

How to parse 4th line of my document positons 10 thru 37

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Adi - 26 Nov 2006 06:34 GMT
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

Rate this thread:






 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.