Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 09-16-2019, 11:14 AM
Porteņo Porteņo is offline looping thru heading2 sections and relocate them Windows 10 looping thru heading2 sections and relocate them Office 2016
Novice
looping thru heading2 sections and relocate them
 
Join Date: Sep 2019
Posts: 2
Porteņo is on a distinguished road
Default looping thru heading2 sections and relocate them

Hi, it has been ages since the last time I coded VBA, but alway Excel and some Access.

Now is time on Word. I'm glad I found you!

Sections of my document fall under the heading style of heading 2. The section headings will be labeled for instance:

Section Heading 1
Section Heading 2


Section Heading 3
Section Heading 4
Section Heading 5

Some or all of these headings may exist in a document and they may not appear in the order listed above.

on running the macro I would like the sections in the document to be ordered so that they match the list above.


I'm just starting with this code, but I can't understand what I'm seeing watching Sec.

Code:
Dim Sec As Section
    For Each Sec In ActiveDocument.Sections
       
    Next Sec
Would you point me out some reference to the object model fast track tutorial?
Reply With Quote
  #2  
Old 09-17-2019, 06:56 PM
Porteņo Porteņo is offline looping thru heading2 sections and relocate them Windows 10 looping thru heading2 sections and relocate them Office 2016
Novice
looping thru heading2 sections and relocate them
 
Join Date: Sep 2019
Posts: 2
Porteņo is on a distinguished road
Default

I was completely wrong with my approach, now I'm close.

Odd no one commented a thing.
Reply With Quote
Reply



Similar Threads
Thread Thread Starter Forum Replies Last Post
looping thru heading2 sections and relocate them Word VBA - "Page left Blank" between Sections to make all Sections start on even page Cov_ATC Word VBA 10 11-28-2021 03:41 PM
Add, Resize & Relocate Header & Footer with Macros Sarah123 Word VBA 11 11-13-2018 07:15 AM
Looping through emails knarfreppep Outlook 2 04-07-2018 08:03 AM
Looping Question Steve B PowerPoint 0 01-19-2011 10:44 AM
Relocate footnotes to facing page Wydeye Word 0 02-23-2010 05:48 PM

Other Forums: Access Forums

All times are GMT -7. The time now is 01:56 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2024 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft