Re: Seq field solution?

Subject: Re: Seq field solution?
From: Ned Bedinger <doc -at- edwordsmith -dot- com>
To: TECHWR-L <techwr-l -at- lists -dot- techwr-l -dot- com>
Date: Wed, 12 Mar 2008 07:04:45 -0700

Geoff Lane wrote:
> On Thursday, March 6, 2008, jopakent -at- comcast -dot- net wrote;
>
>> Can someone point me in the right direction before I self-emmolate out of utter frustration?
> ---
>
> You can create macros (record them if you're not comfortable with the
> VBA Editor) to create the required levels. For each level, define a
> sequence and also include code to reset the next level down to zero.
> While you can reset all lower levels, you should only need to reset
> the next level down unless you are in the habit of following (say) a
> level 1 item with a level 3 item. You can add these macros to a custom
> tool bar or menu.
>

Hi Geoff--

I agree with you. I think experience with VBA and Word's model can make
short work of problems that corner and frustrate the menu-driven users.

Following Stuart's recommendation earlier in this thread, I read an
explanation on the MVP site about Word's numbering problems. Numbering
uses 'List Templates', which apparently have some strict rules for
successful use, without which they can get corrupted. I haven't had any
time to play with it yet, but I did find the applicable object in VBA
help, and it looked documented and straight-forward to program. Have you
worked with List Templates in VBA? I'm just curious, not dissing the
style- or field-based solutions at all.

--Ned


> It's probably easier to show you. Here's some I prepared earlier:
>
> Sub InitialiseOutline()
> ' Set level 1 initially to zero
> Selection.Fields.Add Range:=Selection.Range, _
> Type:=wdFieldEmpty, Text:="SEQ L1 \h \r0", _
> PreserveFormatting:=False
> End Sub
>
> Sub Level1()
> ' Add a level 1 number and reset level 2 to zero
> Selection.Fields.Add Range:=Selection.Range, _
> Type:=wdFieldEmpty, Text:="SEQ L1", _
> PreserveFormatting:=False
> Selection.Fields.Add Range:=Selection.Range, _
> Type:=wdFieldEmpty, Text:="SEQ L2 \h \r0", _
> PreserveFormatting:=False
> End Sub
>
> Sub Level2()
> ' Copy current level 1, add a level 2 number
> ' and reset level 3 to zero
> Selection.Fields.Add Range:=Selection.Range, _
> Type:=wdFieldEmpty, Text:="SEQ L1 \c", _
> PreserveFormatting:=False
> Selection.TypeText "."
> Selection.Fields.Add Range:=Selection.Range, _
> Type:=wdFieldEmpty, Text:="SEQ L2", _
> PreserveFormatting:=False
> Selection.Fields.Add Range:=Selection.Range, _
> Type:=wdFieldEmpty, Text:="SEQ L3 \h \r0", _
> PreserveFormatting:=False
> End Sub
>
> Sub Level3()
> ' Copy current levels 1 and 2 and
> ' add a level 3 number
> Selection.Fields.Add Range:=Selection.Range, _
> Type:=wdFieldEmpty, Text:="SEQ L1 \c", _
> PreserveFormatting:=False
> Selection.TypeText "."
> Selection.Fields.Add Range:=Selection.Range, _
> Type:=wdFieldEmpty, Text:="SEQ L2 \c", _
> PreserveFormatting:=False
> Selection.TypeText "."
> Selection.Fields.Add Range:=Selection.Range, _
> Type:=wdFieldEmpty, Text:="SEQ L3", _
> PreserveFormatting:=False
> End Sub
>
> Note that if you insert a list item the following list items won't
> change to reflect the insertion until you update the associated
> fields. To do that, select the list (or the entire document) then
> press F9.
>
> HTH,
>

^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

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.


Follow-Ups:

References:
Seq field solution?: From: jopakent
Re: Seq field solution?: From: Geoff Lane

Previous by Author: Re: WOW: 15 Years! Thanks!
Next by Author: Re: More usage: "Open" or "Access" web addresses
Previous by Thread: Re: Seq field solution?
Next by Thread: Re: Seq field solution?


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


Sponsored Ads