View Single Post
 
Old 01-02-2022, 09:55 PM
gmayor's Avatar
gmayor gmayor is offline Windows 10 Office 2019
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

The message suggests a file path error.
Change
Code:
StrTxt = ActiveDocument.path & "" & StrTxt
to
Code:
StrTxt = ActiveDocument.path & "\" & StrTxt
However you should ensure that the document you are splitting has actually been saved or it won't have a path.
See also https://www.gmayor.com/MergeAndSplit.htm or
E-Mail Merge Add-in
__________________
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