Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #12  
Old 09-06-2018, 10:57 PM
gmayor's Avatar
gmayor gmayor is offline Divide Text Doc into Multiple Parts at .pa Delimiter Windows 10 Divide Text Doc into Multiple Parts at .pa Delimiter 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

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
Reply With Quote
 

Tags
macro, page break, split



Similar Threads
Thread Thread Starter Forum Replies Last Post
How to divide a landscape page into 2 parts rtcary Word 1 01-17-2018 12:07 AM
One long string of text with ; as the delimiter Laurie B. Excel 1 02-28-2015 03:02 AM
Divide Text Doc into Multiple Parts at .pa Delimiter Split file using variable delimiter kramer74 Word VBA 7 09-01-2014 12:12 AM
How do I edit text in Quick Parts? TommyVincent Word 4 07-30-2014 01:51 PM
divide page into 4 parts aclark17 Word 4 01-17-2012 09:04 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 08:26 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