Hello.
I have a document with a multilevel, outline-numbered list. A section break seperates the first level items. Looks a little like this :
1. Chapter 1
1.1 subtitle
------section break----------
2. Chapter 2
2.1 subtitle
2.2 subtitle
Now for each section, Ì need to print a footer with the Number of the chapter. When i select the text in the range though, it seems to exclude the number. Now i'm hitting a wall.
Does anybody know how to get the paragraph number into a string?
For Each sec In ActiveDocument.Sections
For Each para In sec.Range.Paragraphs 'goes through paragraphs in the current section
If para.OutlineLevel = 1 Then 'level 1 title
h1 = para.Range.Text 'TO CHANGE
end if
Next para
sec.Footers(wdHeaderFooterPrimary).Range = h1
next sec
I have a document with a multilevel, outline-numbered list. A section break seperates the first level items. Looks a little like this :
1. Chapter 1
1.1 subtitle
------section break----------
2. Chapter 2
2.1 subtitle
2.2 subtitle
Now for each section, Ì need to print a footer with the Number of the chapter. When i select the text in the range though, it seems to exclude the number. Now i'm hitting a wall.
Does anybody know how to get the paragraph number into a string?
For Each sec In ActiveDocument.Sections
For Each para In sec.Range.Paragraphs 'goes through paragraphs in the current section
If para.OutlineLevel = 1 Then 'level 1 title
h1 = para.Range.Text 'TO CHANGE
end if
Next para
sec.Footers(wdHeaderFooterPrimary).Range = h1
next sec