T
Toxicdistortion
Windows XP Pro SP2
Word 2002 SP3
I am new to VBA for Word, but I've programmed extensively with VBA for
Excel, so I'm pretty familiar with the VBE and how VBA works in general,
it's just that Word presents an object model I'm not familiar with.
Anyway...
I have a 360 page Word document. There are five Section breaks in the
document (Insert/Break/Section Break Type/Next Page), and each section has
multiple Page Breaks (Insert/Break/Break types/Page break). I've been
looking at the Word VBA Help and I'm very interested in making use of the
Range or Section objects. As a training exercise, I'm trying to write a
Macro with a nested loop that will loop through each section, and within
each section loop through each "sub-section" (the page breaks within each
section). I guess I'm asking if the breaks that I've inserted in my
document are sufficient to be used as objects to loop through in my
document. Another thing about this document is that I've used the Outline
toolbar a lot to assign Headings to the various levels of my document. The
first line in each section is assigned an Outline level of 1, while the
first line in the sub-sections in each main section are assigned an Outline
level 2. Is this helpful at all for looping in a Macro?
I hope the above makes some sort of sense. Basically what I want to know is
1) what should I do to the document so that 2) I can access various parts of
it via macros.
Any and all help or suggestions appreciated. Thanks!!
-gk-
========================================================================
"The creative act is not the province of remote oracles or rarefied
geniuses but a transparent process that is open to everyone."
-Greg Kot in Wilco Learning How To Die-
Word 2002 SP3
I am new to VBA for Word, but I've programmed extensively with VBA for
Excel, so I'm pretty familiar with the VBE and how VBA works in general,
it's just that Word presents an object model I'm not familiar with.
Anyway...
I have a 360 page Word document. There are five Section breaks in the
document (Insert/Break/Section Break Type/Next Page), and each section has
multiple Page Breaks (Insert/Break/Break types/Page break). I've been
looking at the Word VBA Help and I'm very interested in making use of the
Range or Section objects. As a training exercise, I'm trying to write a
Macro with a nested loop that will loop through each section, and within
each section loop through each "sub-section" (the page breaks within each
section). I guess I'm asking if the breaks that I've inserted in my
document are sufficient to be used as objects to loop through in my
document. Another thing about this document is that I've used the Outline
toolbar a lot to assign Headings to the various levels of my document. The
first line in each section is assigned an Outline level of 1, while the
first line in the sub-sections in each main section are assigned an Outline
level 2. Is this helpful at all for looping in a Macro?
I hope the above makes some sort of sense. Basically what I want to know is
1) what should I do to the document so that 2) I can access various parts of
it via macros.
Any and all help or suggestions appreciated. Thanks!!
-gk-
========================================================================
"The creative act is not the province of remote oracles or rarefied
geniuses but a transparent process that is open to everyone."
-Greg Kot in Wilco Learning How To Die-