AUTONUMLGL Brain Freeze

Subject: AUTONUMLGL Brain Freeze
From: jopakent -at- comcast -dot- net
To: techwr-l -at- lists -dot- techwr-l -dot- com (TECHWR)
Date: Wed, 04 Jun 2008 00:11:00 +0000

A couple months ago I thought I was going to be working with numbered paragraph styles regularly and worked with this list to create the following macros instead of having to rely on Word's auto-numbering.

I've not been working with these at all since setting them up and now I'm jumping back in again. Now I see that I'm going to need to adjust these a bit.

First off I need to be able to start the autonumbering somewhere other than 1 (see previous post).
Next (and this IS embarassing), I need to add a 4th level head that will track the previous heading levels. I'm probably trying to run through this too fast, but looking at the 3 macro's I've got, I don't see what's making them nest. They work, but how?
H1 produces 1.0
H2 produces 1.1
H3 produces 1.1.1
H4 needs to produce 1.1.1.1.

Can somebody shine a bright light through my feeblemindedness? I see a difference between H1 and H2, but other than the name, I don't see a difference between H2 and H3 so I can add another level (H4).

Aaarrggh -at- #$%^&


' H1 Macro
'
Selection.Style = ActiveDocument.Styles("Heading 1")
Selection.HomeKey Unit:=wdLine
Selection.Fields.Add Range:=Selection.Range, Type:=wdFieldEmpty, Text:= _
"AUTONUMLGL \s . ", PreserveFormatting:=False
Selection.TypeText Text:="0" & vbTab
End Sub
Sub H2()
'
' H2 Macro
'
Selection.Style = ActiveDocument.Styles("Heading 2")
Selection.HomeKey Unit:=wdLine
Selection.Fields.Add Range:=Selection.Range, Type:=wdFieldEmpty, Text:= _
"AUTONUMLGL \e \s . ", PreserveFormatting:=False
Selection.TypeText Text:=vbTab
End Sub
Sub H3()
'
' H3 Macro
'
Selection.Style = ActiveDocument.Styles("Heading 3")
Selection.HomeKey Unit:=wdLine
Selection.Fields.Add Range:=Selection.Range, Type:=wdFieldEmpty, Text:= _
"AUTONUMLGL \e \s . ", PreserveFormatting:=False
Selection.TypeText Text:=vbTab
End Sub

TIA

--
J. Paul Kent
206-383-0539
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Create HTML or Microsoft Word content and convert to Help file formats or
printed documentation. Features include support for Windows Vista & 2007
Microsoft Office, team authoring, plus more.
http://www.DocToHelp.com/TechwrlList

True single source, conditional content, PDF export, modular help.
Help & Manual is the most powerful authoring tool for technical
documentation. Boost your productivity! http://www.helpandmanual.com

---
You are currently subscribed to TECHWR-L as archive -at- web -dot- techwr-l -dot- com -dot-

To unsubscribe send a blank email to
techwr-l-unsubscribe -at- lists -dot- techwr-l -dot- com
or visit http://lists.techwr-l.com/mailman/options/techwr-l/archive%40web.techwr-l.com


To subscribe, send a blank email to techwr-l-join -at- lists -dot- techwr-l -dot- com

Send administrative questions to admin -at- techwr-l -dot- com -dot- Visit
http://www.techwr-l.com/ for more resources and info.


Previous by Author: AUTONUMGL
Next by Author: Re: AUTONUMGL
Previous by Thread: RE: AUTONUMGL
Next by Thread: RE: AUTONUMGL except that in Word 2003


What this post helpful? Share it with friends and colleagues:


Sponsored Ads