Forums
New posts
Search forums
Members
Current visitors
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Search forums
Menu
Log in
Register
Install the app
Install
Forums
Archive
Newsgroup Archive
Word Newsgroups
Word VBA Beginners
pulling text from a word document
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
Reply to thread
Message
[QUOTE="Cindy M -WordMVP-, post: 5792433"] Hi Colemandg, We can assume that the path will always follow the text (plus colon and space)? Use the FIND property (as in Selection.Find or Range.Find) to locate the text. Collapse the selection or range to a point. Extend it to the end of the cell, minus two characters to pick up the path. Very roughly: Dim rng as Word.Range With rng.Find .Text = "Use the 'Export' bat file to export projects. Copy exported projects to the following folder:" .Execute end With rng.Collapse wdCollapseEnd rng.End = rng.Cells(1).Range.End rng.MoveEnd Unit:=wdCharacter, Count:=2 strpath = rng.Text Cindy Meister INTER-Solutions, Switzerland [URL]http://homepage.swissonline.ch/cindymeister[/URL] (last update Jun 8 2004) [URL]http://www.word.mvps.org[/URL] This reply is posted in the Newsgroup; please post any follow question or reply in the newsgroup and not by e-mail :-) [/QUOTE]
Verification
Post reply
Forums
Archive
Newsgroup Archive
Word Newsgroups
Word VBA Beginners
pulling text from a word document
Top