Positioning cursor

User avatar
Don Wells
5StarLounger
Posts: 689
Joined: 27 Jan 2010, 16:45
Location: Ottawa, Ontario, Canada

Positioning cursor

Post by Don Wells »

I have captions looking like this:
    Figure 6-27 FTP Continuous Information Area

Using code, I would like to place the cursor at the start of the caption text. Is there any property which will extract the caption text from a caption? Or snippet of code which will place the cursor at the beginning of the text?

T.I.A.
Regards
Don

User avatar
HansV
Administrator
Posts: 78241
Joined: 16 Jan 2010, 00:14
Status: Microsoft MVP
Location: Wageningen, The Netherlands

Re: Positioning cursor

Post by HansV »

Try this - you may have to adjust it for your situation.

With the selection or insertion point anywhere in the caption, the following should place the insertion point after the number:

Selection.Paragraphs(1).Range.Fields(1).Select
Selection.MoveRight Count:=2
Best wishes,
Hans