Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 06-03-2013, 08:16 PM
macropod's Avatar
macropod macropod is offline split word document based on bookmarks with each new document title of the bookmark Windows 7 32bit split word document based on bookmarks with each new document title of the bookmark Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 22,467
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default


Since the bookmark names need to begin with a letter, you could change:
StrFld = BkMk.Name & "\"
to:
StrFld = Right(BkMk.Name, Len(BkMk.Name) - 1) & "\"

You might also need to change:
.SaveAs2
to:
.SaveAs
and change:
If Dir(StrPth & StrFld, vbDirectory) = "" Then MkDir (StrPth & StrFld)
to:
On Error Resume Next
MkDir (StrPth & StrFld)
On Error GoTo 0
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
  #2  
Old 09-05-2020, 02:29 PM
mi42 mi42 is offline split word document based on bookmarks with each new document title of the bookmark Windows 10 split word document based on bookmarks with each new document title of the bookmark Office 2016
Novice
 
Join Date: Sep 2020
Posts: 1
mi42 is on a distinguished road
Default

Hi Paul,

First of all, I would like to thank you very much for the macro.
Would it be possible to modify the macro in such a way that it also copies the content of the header and footer and removes the page breaks in the created files?


I managed to remove page breaks puting
.Range.Find.Execute Findtext:="^b", ReplaceWith:=""


between

.Range.PasteAndFormat wdFormatOriginalFormatting and .SaveAs FileName:=StrPth & StrFld & StrNm, _

Last edited by mi42; 09-06-2020 at 02:42 AM.
Reply With Quote
Reply



Similar Threads
Thread Thread Starter Forum Replies Last Post
split word document based on bookmarks with each new document title of the bookmark How to have the location (path) of the Word document on the title bar? Jamal NUMAN Word 24 09-06-2017 12:18 PM
split word document based on bookmarks with each new document title of the bookmark Good Word-based Document Assembly Software? Grahamers Word 1 05-13-2013 04:42 PM
split word document based on bookmarks with each new document title of the bookmark Split MailMerge document agujoa Mail Merge 3 04-08-2012 11:26 PM
split word document based on bookmarks with each new document title of the bookmark Display Full File Path Name of Document in Title bar MS-Word 2010 Carlos06x Word 1 10-12-2011 10:39 AM
Bookmark to another document spqr Word 3 06-26-2009 04:51 AM

Other Forums: Access Forums

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