View Single Post
 
Old 07-17-2017, 01:21 AM
gmayor's Avatar
gmayor gmayor is offline Windows 10 Office 2016
Expert
 
Join Date: Aug 2014
Posts: 4,106
gmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud of
Default

You will probably find that the line should be
Code:
ActiveDocument.Undo 1
or you will get an error message. You can also achieve the same thing, without Undo, by moving the start and end of the range.
There may also be a moire elegant way of extracting the name from the document, should you wish to share an example document.
__________________
Graham Mayor - MS MVP (Word) (2002-2019)
Visit my web site for more programming tips and ready made processes www.gmayor.com
Reply With Quote