![]() |
|
![]() |
|
Thread Tools | Display Modes |
|
#1
|
||||
|
||||
![]() 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] |
#2
|
|||
|
|||
![]()
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. |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
![]() |
Jamal NUMAN | Word | 24 | 09-06-2017 12:18 PM |
![]() |
Grahamers | Word | 1 | 05-13-2013 04:42 PM |
![]() |
agujoa | Mail Merge | 3 | 04-08-2012 11:26 PM |
![]() |
Carlos06x | Word | 1 | 10-12-2011 10:39 AM |
Bookmark to another document | spqr | Word | 3 | 06-26-2009 04:51 AM |