Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Word / Programming / May 2008

Tip: Looking for answers? Try searching our database.

macro for displaying section field +1 digit?

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Bob W - 08 May 2008 22:54 GMT
The Section field, when added into a document, displays an arabic numeral
showing the section number where it resides.

What syntax would cause display of the section number, incremented by one
digit?

(ie, the Section field, if placed in section 2, displays a "2" but with this
new syntax, would display a "3";  if positioned in section 12 it would
display a "13", etc.)
Doug Robbins - Word MVP - 09 May 2008 01:22 GMT
The following Field construction

{ = { SECTION } + 1 }

You must use Ctrl+F9 to insert each pair of field delimiters and Alt+F9 to
toggle off their display.

Signature

Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP

> The Section field, when added into a document, displays an arabic numeral
> showing the section number where it resides.
[quoted text clipped - 6 lines]
> new syntax, would display a "3";  if positioned in section 12 it would
> display a "13", etc.)
Bob W - 09 May 2008 15:44 GMT
Doug, this is wierd.

If I choose Insert Field and choose the SECTION macro from the list, i get a
section number displayed in the document.

The resulting field, when made visible with Alt-F9, reads,

{ SECTION \* Arabic \* MERGEFORMAT }  and, all is well.

But if I use Ctrl-F9 to insert delimiters and very, very carefully manually
type that very same syntax, I get NO section numeral!

Similarly, when I type the syntax you propose,

{ = { SECTION } + 1}

this also does not produce a section number display.

I also tried,

{ = { SECTION \* Arabic \* MERGEFORMAT } + 1}

...but this does not produce a section number display, either.

Where am I going wrong?

> The following Field construction
>
[quoted text clipped - 13 lines]
> > new syntax, would display a "3";  if positioned in section 12 it would
> > display a "13", etc.)
Doug Robbins - Word MVP - 11 May 2008 22:57 GMT
It definitely works here.  Did you update the field?

Signature

Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP

> Doug, this is wierd.
>
[quoted text clipped - 44 lines]
>> > new syntax, would display a "3";  if positioned in section 12 it would
>> > display a "13", etc.)
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.