![]() |
|
|
Thread Tools | Display Modes |
#2
|
||||
|
||||
![]()
You can either set a range at the start and select the range at the end e.g.
Code:
Dim oRng As Range Set oRng = Selection.Range ' 'Do stuff ' ' oRng.Select Code:
Sub TNR() Dim oStory As Range For Each oStory In ActiveDocument.StoryRanges oStory.Font.Name = "Times New Roman" If oStory.StoryType <> wdMainTextStory Then While Not (oStory.NextStoryRange Is Nothing) Set oStory = oStory.NextStoryRange oStory.Font.Name = "Times New Roman" Wend End If Next oStory lbl_Exit: Set oStory = Nothing Exit Sub End Sub
__________________
Graham Mayor - MS MVP (Word) (2002-2019) Visit my web site for more programming tips and ready made processes www.gmayor.com |
Tags |
pane view variable |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
excel macro returning the wrong value | anne.kiss@ntlworld.com | Excel Programming | 7 | 03-14-2019 05:53 AM |
OneNote Undo: Insertion point/cursor "jumps" when typing Ctrl+Z | aspiringgeek | OneNote | 0 | 03-21-2017 07:23 PM |
![]() |
stevec5088 | Word | 1 | 12-14-2016 02:45 PM |
![]() |
Danny DeLoach | Outlook | 2 | 08-16-2011 11:58 AM |
A macro to mirror the movement of the cursor | ACA | Word VBA | 0 | 08-24-2010 03:21 PM |