Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 02-21-2023, 03:12 PM
Guessed's Avatar
Guessed Guessed is offline Macro to bold and center the first line of each page. Windows 10 Macro to bold and center the first line of each page. Office 2016
Expert
 
Join Date: Mar 2010
Location: Canberra/Melbourne Australia
Posts: 4,176
Guessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant future
Default

The UndoRecord is not necessary for your macro but it is handy if there is a chance you want to UNDO all the steps of the macro with a single keystroke.



Word's undo command steps backwards through the most recent document changes. When a macro performs a lot of changes to a document it takes a lot of consecutive undo commands to reverse out all the changes made by that macro. Those lines in Brian's code groups all of those single steps into a single undo command.

So if you don't expect to undo the macro's changes then it will make no difference to the code if you include or don't include those lines.
__________________
Andrew Lockton
Chrysalis Design, Melbourne Australia
Reply With Quote
  #2  
Old 02-21-2023, 09:43 PM
MDom MDom is offline Macro to bold and center the first line of each page. Windows 10 Macro to bold and center the first line of each page. Office 2013
Novice
Macro to bold and center the first line of each page.
 
Join Date: Apr 2022
Posts: 4
MDom is on a distinguished road
Default

Andrew,

That makes sense - thank you for the explanation.
Reply With Quote
Reply



Similar Threads
Thread Thread Starter Forum Replies Last Post
Macro to make a LINE BOLD under cursor Retko Word VBA 4 01-28-2022 03:38 AM
Macro to bold and center the first line of each page. Justify left center and right center on same line DiGug Word 3 10-02-2014 02:43 PM
Format Bold in one line makes all lines bold Nitte Word 2 02-07-2013 12:34 AM
How to Center One Line Vertically on Blank Page SQLUSA Word 1 08-29-2012 08:14 PM
Macro that will go to line # and center text marge Word VBA 0 09-10-2010 12:30 PM

Other Forums: Access Forums

All times are GMT -7. The time now is 10:35 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft