incorrect numbering caption

A

Associates

Hi,

I am having trouble in getting this caption to work in word document.

Say, i have Chapters in the document as follows

Chapter 1. Introduction
....
some picture
Figure 1.1 picture of world

Chapter 2. Agreement
....
some picture
Figure 2.2 picture of strait times

My question is how do i set it so that it will print "Figure 2.1 picture of
strait times" because it is the first picture in Chapter 2. The Styleref
picked up the chapter number but not for the SEQ

Here is the code, it says STYLEREF \s "Section Heading 1"}.{SEQ Figure \*
Arabic \s "Section Heading 1"}.

Thank you for your help in advance
 
S

Stefan Blom

Unfortunately, the \s switch only works with the *built-in* headings (\s 1
restarts after a Heading 1 paragraph, \s 2 restarts after a Heading 2
paragraph, and so on).

What you can do is restart the numbers explicitly, by adding the \r switch
to each SEQ field where the numbering should restart.
 
A

Associates

Thank you for your suggestion. It works really well when i manually change
the switch key from \s to \r when there is a need for numbering to be
restarted

But because i want to use macros to insert this styleref caption to the
document, i find it hard to change the switch over.

I set up two autotexts, one with SEQ \s and the other one SEQ \r. I call the
autotexts with \s switch everytime a new Chapter is inserted to the document,
otherwise just call autotexts with SEQ \s. However the problem arises when
someone wants to add another picture after a picture has been entered
previously.

For example: (initial stage)
Chapter 1. Introduction
....
some picture
Figure 1.1 picture of world

Chapter 2. Agreement
....
some picture
Figure 2.1 picture of strait times

(later stage)

Chapter 2. Agreement

<----- insert another picture here
....
some picture
Figure 2.1 picture of strait times

If i want to insert another picture, it will come up as "Figure 2.2 new
picture" rather than "Figure 2.1 new picture" and then followed by "Figure
2.2 picture of strait times". This is because the Chapter 2 has already been
there before "new picture" was to be added. I have run out of ideas about how
to get around this.

If there is a way of checking within the Chapter to see if there is any
picture before adding in a new picture, it would be a lot easier. Is this
possible to check this with word?

Thank you once again for your help in advance
 
S

Stefan Blom

It is possible that what you are asking for can be done via a macro, but I
wouldn't know how. The difficult part is detecting the presence of a picture
(or the presence of a particular style for that matter). It would be a lot
easier to make use of the built-in heading styles.
 
A

Associates

Thank you Stefan for your reply.

It all worked out already. Thanks for the advise. I used the heading
built-in style by Shauna Kelly as suggested by you.

Many thanks again
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top