![]() |
|
#1
|
|||
|
|||
|
I need to remove the section 2, merging the document in only one section with a VBA code.
Code:
Sub Rem_Sec()
Dim oSec As Section, x As Integer
For x = 2 To ActiveDocument.Sections.Count
ActiveDocument.Sections(x).Headers(wdHeaderFooterPrimary).LinkToPrevious = True
Next x
With ActiveDocument.Range.Find
.Text = "^b"
.Replacement.Text = ""
.Forward = True
.Wrap = wdFindContinue
.Execute Replace:=wdReplaceAll
End With
End Sub
There's any solution to this? Thanks. |
|
#2
|
||||
|
||||
|
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
|
#3
|
|||
|
|||
|
Works fine, thanks.
|
|
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Cannot remove watermark after section break | DLM | Word | 2 | 06-12-2018 09:14 AM |
| Remove Section break | Anitha | Word | 3 | 12-21-2017 06:00 AM |
How do I remove a section
|
mickapoo | Word | 11 | 01-26-2016 06:58 PM |
| section page numbers reverting to following on from previous section after generating index | cloudtrapezer | Word | 1 | 06-25-2015 01:16 AM |
Remove unwanted Page in a Section Break
|
JacobReef | Word | 1 | 06-10-2012 07:04 AM |