Results 1 to 6 of 6
  1. #1
    2 Star Lounger
    Join Date
    Oct 2007
    Posts
    172
    Thanks
    0
    Thanked 2 Times in 1 Post

    Figure Captions in Appendix (Word 2003)

    Hi,
    having moved on to something else... I have a different question:

    Page numbering in footers can include the "Chapter" number. As far as I am aware, the chapter number is associated to a heading level and is set or is specific for each document section.

    In contrast, a Figure Caption can also include the "Chapter number" and can also be associated to a heading level.. the crucial difference being that associated Heading level is a global setting for the whole document and NOT specific to a section.

    That means in an Appendix I can get the correct page numbers e.g. A-1, A-2 etc because the Annex Heading style is based on Heading Level 7 (our choice.. we could have defined that differently), and I choose to associate the Chapter Number with Heading Level 7 for this section.

    For Figures in the Appendix, I can display the Chapter number in the Figure Caption to get "Figure A-1" for example, by associating Heading Level 7 to the Chapter number... unfortunately though, this changes all other captions in the whole document which kinda screws the whole plan.

    can any one spell out to me the best way of getting round this. I am beginning to think i need to base the Appendix Heading Levels on Heading 1 rather than Heading 7...

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Figure Captions in Appendix (Word 2003)

    You can create a new label for captions by clicking New Label... in the Insert | Reference | Caption... dialog. You could use Appendix Figure, for example. A different label can have its own settings.

  3. #3
    2 Star Lounger
    Join Date
    Oct 2007
    Posts
    172
    Thanks
    0
    Thanked 2 Times in 1 Post

    Re: Figure Captions in Appendix (Word 2003)

    Hi,

    thanks for the tip. Thats a better idea. Pain in the a** for me though, because I have a toolbar macro to insert captions for tables and figures in order to get the formatting consistent. This means I would need a separate macro for Appendix figures and tables, which means two more toolbar buttons.. unless I can figure out somehow from the VB that I am in an appendix! Ouch..

  4. #4
    Super Moderator
    Join Date
    Jan 2001
    Location
    Melbourne, Victoria, Australia
    Posts
    3,852
    Thanks
    4
    Thanked 259 Times in 239 Posts

    Re: Figure Captions in Appendix (Word 2003)

    You should be able to work out the current heading level to allow you to determine whether you are in an Appendix. For instance, if you are using heading 7 for appendixes then if your preceding heading style is Heading 7, 8 or 9 then you must be in an Appendix.

    Now to work out what Heading level precedes the current selection you might look at this thread <post:=166,217>post 166,217</post:> which will give you pointers on how you might work out the relevant information. You might also have better luck finding a direct answer because I seem to remember seeing it here once before but cant find it at the moment.
    Andrew Lockton, Chrysalis Design, Melbourne Australia

  5. #5
    2 Star Lounger
    Join Date
    Oct 2007
    Posts
    172
    Thanks
    0
    Thanked 2 Times in 1 Post

    Re: Figure Captions in Appendix (Word 2003)

    thanks for the suggestion.. yes, I was thinking already about checking if the preceding style is Heading 7, but that seemed a bit unreliable and hacky - but I guess I have to slacken my own high standards when coding in VBA hehhe.

  6. #6
    2 Star Lounger
    Join Date
    Oct 2007
    Posts
    172
    Thanks
    0
    Thanked 2 Times in 1 Post

    Re: Figure Captions in Appendix (Word 2003)

    OK, I can do what I want to do in one line of code:

    IsSelectionInAnnex = Selection.range.GoToPrevious(wdGoToHeading).ListFo rmat.ListLevelNumber >= Consts.CAnnexListLevelNumber

    easy when you know how!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •