The only ways I can see why the macro I posted would cause that error are
1. That you are using Word 2007 in which case change
oDoc.SaveAs2 strDocName
to
oDoc.SaveAs strDocName
or
2. that you have not changed the line
Const strPath As String = "C:\Path\" 'the folder to save the files
to reflect a path that exists in which to save the documents. Otherwise it splits your test document without issue.
__________________
Graham Mayor - MS MVP (Word) (2002-2019)
Visit my web site for more programming tips and ready made processes www.gmayor.com
|