View Single Post
 
Old 03-14-2022, 04:11 AM
Scaffold Scaffold is offline Windows 10 Office 2016
Advanced Beginner
 
Join Date: Oct 2009
Location: Moscow, Russia
Posts: 36
Scaffold is on a distinguished road
Default

Quote:
Originally Posted by Guessed View Post
I'll assume the textframe in question is the one you already have selected.
Code:
Sub Demo()
  Dim aRng As Object
  Selection.ShapeRange(1).TextFrame.TextRange.Select
  Set aRng = Selection.Range
  aRng.MoveStart Unit:=wdCharacter, Count:=1
  aRng.Select
End Sub
it works, but I have one more question: how do I unselect the range? After the macro finihses working, the selection remains active. I tried Application.Selection.EndOf and Selection.Collapse but it doesn't help. Can it be related to the fact that my textframes are contained in the header/footer area?

Last edited by Scaffold; 03-14-2022 at 11:42 AM.
Reply With Quote