![]() |
#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.
__________________
Backup your original file before doing any modification. |
|
![]() |
||||
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 |
![]() |
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 |
![]() |
JacobReef | Word | 1 | 06-10-2012 07:04 AM |