Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #4  
Old 08-05-2015, 11:55 PM
macropod's Avatar
macropod macropod is offline Auto Separate Word Doc Per Section Into Multiple PDF's Windows 7 64bit Auto Separate Word Doc Per Section Into Multiple PDF's 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

The necessary code would be:
Code:
  With .Range
    With .Find
      .ClearFormatting
      .Replacement.ClearFormatting
      .Text = ""
      .Replacement.Text = ""
      .Forward = True
      .Wrap = wdFindStop
      .Format = True
      .Style = wdStyleHeading1
      .MatchCase = False
      .MatchWholeWord = False
      .MatchWildcards = False
      .MatchSoundsLike = False
      .MatchAllWordForms = False
      .Execute
    End With
    Do While .Find.Found = True
      If i > 0 Then .Duplicate.InsertBreak Type:=wdSectionBreakNextPage
      .Collapse wdCollapseEnd
      .Find.Execute
      i = i + 1
    Loop
  End With
inserted after:
With ActiveDocument
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
 

Tags
pdf, separate



Similar Threads
Thread Thread Starter Forum Replies Last Post
Combine multiple word files into 1 document and add section breaks svo Word VBA 3 08-05-2015 03:05 AM
Creating colour coded columns and auto-generete statistic in separate sheet krigre Excel 1 06-10-2015 04:30 AM
Auto Separate Word Doc Per Section Into Multiple PDF's Get multiple cells in separate worksheet kerkstrt Excel 1 10-26-2014 11:20 PM
Auto Separate Word Doc Per Section Into Multiple PDF's Auto Fill Multiple Word documents thebeekeepingbiker Word 3 07-08-2013 07:23 PM
Any easy way to separate a Word document into separate files? SamHelm Word 0 08-21-2010 05:29 AM

Other Forums: Access Forums

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