V
Vignesh Ganesan
Hello All,
I'm trying to create a macro that will return the current section
number. I've read every article about this that I can find -
1.
http://groups.google.com/group/micr...gst&q=current+section+number#2b48bb877437540a
2.
http://groups.google.com/group/micr...gst&q=current+section+number#4334d3bd594d2fba
3. http://www.mvps.org/word/FAQs/MacrosVBA/GetIndexNoOfPara.htm
All of them, though helpful, don't quite work.
My document structure is this -
1. Section1
1.1. SubSection11
1.2. Subsection12
2. Section2
3. Section3
3.1 SubSection31
3.1.1 SubSubSection311
3.1.1.1 SubSubSubSection3111
What I want is the following - when I run my macro from within the
paragraphs of say SubSubSection311, the macro should return 3.1.1. The
articles I linked to above tell me how to count paragraphs, how to get
some representation of the "Section" I'm in, but none of them quite
work. I think the problem arises from the way Word handles "Sections"
- they really aren't sections are they ? They're headings, with List
thingies attached to them. So that's further complication to this...
Anyways, if anyone has any ideas of how to do this, I'd appreciate it
a lot.
Thanks,
Best,
Vignesh.
I'm trying to create a macro that will return the current section
number. I've read every article about this that I can find -
1.
http://groups.google.com/group/micr...gst&q=current+section+number#2b48bb877437540a
2.
http://groups.google.com/group/micr...gst&q=current+section+number#4334d3bd594d2fba
3. http://www.mvps.org/word/FAQs/MacrosVBA/GetIndexNoOfPara.htm
All of them, though helpful, don't quite work.
My document structure is this -
1. Section1
1.1. SubSection11
1.2. Subsection12
2. Section2
3. Section3
3.1 SubSection31
3.1.1 SubSubSection311
3.1.1.1 SubSubSubSection3111
What I want is the following - when I run my macro from within the
paragraphs of say SubSubSection311, the macro should return 3.1.1. The
articles I linked to above tell me how to count paragraphs, how to get
some representation of the "Section" I'm in, but none of them quite
work. I think the problem arises from the way Word handles "Sections"
- they really aren't sections are they ? They're headings, with List
thingies attached to them. So that's further complication to this...
Anyways, if anyone has any ideas of how to do this, I'd appreciate it
a lot.
Thanks,
Best,
Vignesh.