Office 2007 CaptionLabels

  • Thread starter Peter Karlström
  • Start date
P

Peter Karlström

Hi

In one of our projects, a customer uses custom CaptionLabels for their Word
2007 documents.
In order for crossreferences to work, we must add these custom caption
labels to the Word application when it starts.
This is not a problem, but two of the labels are similar to Word standard
labels, Figure and Table.
The customized labels are using swedish names, so we use Figur and Tabell
for the two above.
If a user adds some caption labels for Figur, and then want to add a cross
reference to one of them, the Labels lists as Figure, inspite their actual
SEQ name Figur.
How can this happen?
Our COM Addin also makes it possible to change language for the document,
between swedish and english. The caption Labels Figur is then presented as
Figure in the document text, but the reference name is still Figur (SEQ
Figur).

There is no problem with the other customized caption labels.

Is there another approach to this which we have missed?
Are there any workarounds?

Thanks in advance
 
C

Colbert Zhou [MSFT]

Hello Peter,

I do a test in my side, but cannot observe the issue you described. I use
the following codes to add Figur and Tabell caption labels,
----------------------------------------------------------------------------
-----------------
applicationObject.CaptionLabels.Add("Figur");
applicationObject.CaptionLabels.Add("Tabell");
----------------------------------------------------------------------------
-----------------

Then I can see "Equation", "Figure", "Table", "Figur", "Tabell" in the
Caption dialog. So I add some pictures and Figur caption below them. After
that, I use Cross-reference dialog to choose Figur in Reference type and
insert reference into the document. Both the document text and the
reference name is Figur1. I did not see the issue.

Actually, I think the issue seems more on Office product side instead of
the programming side. Have you tried also post in word product newsgroup to
see if any experts are aware of a similar issue.
http://www.microsoft.com/office/community/en-us/default.mspx?dg=microsoft.pu
blic.word.docmanagement&lang=en&cr=US

By the way, does your code change Word thread language when the end user
insert cross-reference? And does the same issue happen for different
machine or only one machine?


Best regards,
Colbert Zhou
Microsoft Online Support Team
 
P

Peter Karlström

Hello Colbert

Thank you for your reply.

Have you really closed Word in between your work?
We have discovered that Caption Label settings works as expected as long as
you don't close Word. When Word closes it loses the customization, which we
try to correct with the CaptionLabels.Add upon Word first start.
After this we get this strange behaviour.

Best Regards
 

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