View Single Post
 
Old 12-16-2015, 02:09 AM
gmayor's Avatar
gmayor gmayor is offline Windows 10 Office 2016
Expert
 
Join Date: Aug 2014
Posts: 4,137
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 ofgmayor has much to be proud of
Default

'ThisDocument' is the document containing the macro - probably the normal template. What you are interested in here is the 'ActiveDocument'. The code you need is

Code:
Dim myName As String
    myName = Left(ActiveDocument.FullName, InStrRev(ActiveDocument.FullName, Chr(46))) & "docx"
__________________
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