![]() |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
![]()
I apologize if this is too simple. I'm new at this.
I have a macro that changes all text in the main document, header, and footer to Times New Roman font (see below). At the end, it goes to the end of the main document. I would rather it go back to whatever pane was active when the macro started. Even better would be for it to go back to the exact point the cursor was at when it started. I tried lots of variations on setting dimensions of myvariable to various options, then tried setting myvariable=ActiveWindow.ActivePane.View or ActiveWindow.ActivePane.View.SeekView, etc., then at the end of the macro, ActiveWindow.ActivePane.View.SeekView = myhvariable But whatever specific variable type and syntax I need, I couldn't find. Please help. Sub TNR() ' ' Change all fonts to Times New Roman ' ActiveWindow.ActivePane.View.SeekView = wdSeekMainDocument Selection.WholeStory Selection.Font.Name = "Times New Roman" ActiveWindow.ActivePane.View.SeekView = wdSeekCurrentPageHeader Selection.WholeStory Selection.Font.Name = "Times New Roman" ActiveWindow.ActivePane.View.SeekView = wdSeekCurrentPageFooter Selection.WholeStory Selection.Font.Name = "Times New Roman" ActiveWindow.ActivePane.View.SeekView = wdSeekMainDocument Selection.EndOf End Sub |
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 |