Office 2007 Fields-bug?

  • Thread starter Peter Karlström
  • Start date
P

Peter Karlström

Hi

We previously found a bookmark bug in Word 2007 when using fields in tables,
placed in the document header or footer.

Now we have a similar problem, but are not sure this is a "feature" or what.

This is how you reproduce the result:

1. Create a new Word 2007 dotx document
2. Insert a custom document property and give it a value
3. In the document header, insert a 2 x 2-type table
4. In the upper left cell, insert the document property field
5. Change the font for the field to a font other than Times New Roman
6. Place the same field in the upper right cell with same formatting
7. Save the document
8. Open document properties and add some text to the value of the
testproperty
9. Update the fields, for instance by using printpreview
10.Check the formatting of the fields. The Left cells added text is
formatted in another fashion than the rest, and as you can se the right cell
is formatted correctly.

Also if you study the resulting XML-code there seems to be a "preserve"-tag
misplaced here.

Our Addin uses custom proerties a lot in table-cells and this get really
ugly in some cells with larger fonts.
What could be the cause of this?

Thanks in advance
 
J

Jie Wang [MSFT]

Hi Peter,

I followed your repro steps and failed to get the same behavior as you got.
I also tried to search our internal database but found nothing obvious.

Actually I have tried several times with two different configurations:

Word 2007 SP1 & all latest patches
Word 2007 SP2 Beta

The resulting header1.xml which contains the updated fields looks exactly
like this:

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<w:hdr
xmlns:ve="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:eek:="urn:schemas-microsoft-com:eek:ffice:eek:ffice"
xmlns:r="http://schemas.openxmlformats.org/officeDocument/2006/relationships
" xmlns:m="http://schemas.openxmlformats.org/officeDocument/2006/math"
xmlns:v="urn:schemas-microsoft-com:vml"
xmlns:wp="http://schemas.openxmlformats.org/drawingml/2006/wordprocessingDra
wing" xmlns:w10="urn:schemas-microsoft-com:eek:ffice:word"
xmlns:w="http://schemas.openxmlformats.org/wordprocessingml/2006/main"
xmlns:wne="http://schemas.microsoft.com/office/word/2006/wordml">
<w:tbl>
<w:tblPr>
<w:tblStyle w:val="TableGrid"/>
<w:tblW w:w="0" w:type="auto"/>
<w:tblLook w:val="04A0"/>
</w:tblPr>
<w:tblGrid>
<w:gridCol w:w="4428"/>
<w:gridCol w:w="4428"/>
</w:tblGrid>
<w:tr w:rsidR="00D2001E" w:rsidTr="00D2001E">
<w:tc>
<w:tcPr>
<w:tcW w:w="4428" w:type="dxa"/>
</w:tcPr>
<w:p w:rsidR="00D2001E" w:rsidRPr="00D2001E"
w:rsidRDefault="00D2001E">
<w:pPr>
<w:pStyle w:val="Header"/>
<w:rPr>
<w:rFonts w:ascii="Algerian" w:hAnsi="Algerian"/>
</w:rPr>
</w:pPr>
<w:fldSimple w:instr=" DOCPROPERTY TestProp \* MERGEFORMAT ">
<w:r w:rsidR="00FA2CA2">
<w:rPr>
<w:rFonts w:ascii="Algerian" w:hAnsi="Algerian"/>
</w:rPr>
<w:t>Some Text More</w:t>
</w:r>
</w:fldSimple>
</w:p>
</w:tc>
<w:tc>
<w:tcPr>
<w:tcW w:w="4428" w:type="dxa"/>
</w:tcPr>
<w:p w:rsidR="00D2001E" w:rsidRPr="00D2001E"
w:rsidRDefault="00D2001E">
<w:pPr>
<w:pStyle w:val="Header"/>
<w:rPr>
<w:rFonts w:ascii="Algerian" w:hAnsi="Algerian"/>
</w:rPr>
</w:pPr>
<w:fldSimple w:instr=" DOCPROPERTY TestProp \* MERGEFORMAT ">
<w:r w:rsidR="00FA2CA2">
<w:rPr>
<w:rFonts w:ascii="Algerian" w:hAnsi="Algerian"/>
</w:rPr>
<w:t>Some Text More</w:t>
</w:r>
</w:fldSimple>
</w:p>
</w:tc>
</w:tr>
<w:tr w:rsidR="00D2001E" w:rsidTr="00D2001E">
<w:tc>
<w:tcPr>
<w:tcW w:w="4428" w:type="dxa"/>
</w:tcPr>
<w:p w:rsidR="00D2001E" w:rsidRDefault="00D2001E">
<w:pPr>
<w:pStyle w:val="Header"/>
</w:pPr>
</w:p>
</w:tc>
<w:tc>
<w:tcPr>
<w:tcW w:w="4428" w:type="dxa"/>
</w:tcPr>
<w:p w:rsidR="00D2001E" w:rsidRDefault="00D2001E">
<w:pPr>
<w:pStyle w:val="Header"/>
</w:pPr>
</w:p>
</w:tc>
</w:tr>
</w:tbl>
<w:p w:rsidR="00D2001E" w:rsidRDefault="00D2001E">
<w:pPr>
<w:pStyle w:val="Header"/>
</w:pPr>
</w:p>
</w:hdr>

In your original mail:
Also if you study the resulting XML-code there seems to be a "preserve"-tag
misplaced here.

However we don't see the "preserve" tag in the XML above either.

Maybe I misunderstood something here, if this is the case, please let me
know and I'll make the right try.

So could you please send me your sample doc with this issue so I can have a
closer exam on it?

My email address is (e-mail address removed) (please remove the 'online'
part).

And it will be helpful if you could let me know:
1. Is this happening on manually operating Word or programmatically, or
both?
2. Is this happening on all of your machines?
3. Is this happening to both dotx and docx, or just dotx?
4. Is this happening only on tables in header, or also in footer / document
body? (because I can't repro on all of them)

Thank you very much!

Jie Wang ([email protected], remove 'online.')

Microsoft Online Community Support

Delighting our customers is our #1 priority. We welcome your comments and
suggestions about how we can improve the support we provide to you. Please
feel free to let my manager know what you think of the level of service
provided. You can send feedback directly to my manager at:
(e-mail address removed).

==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/en-us/subscriptions/aa948868.aspx#notifications.

Note: MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 2 business days is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions. Issues of this
nature are best handled working with a dedicated Microsoft Support Engineer
by contacting Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/en-us/subscriptions/aa948874.aspx
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.
 
P

Peter Karlström

Hello Jie

I'll send you my sample doc.
Below is answers to your questions;
1. Is this happening on manually operating Word or programmatically, or
both?
We discovered the error from our COM Addin, which changes the customproperty
value and makes a documents.fields.update. My sample is manually created.
2. Is this happening on all of your machines?
Yes, both in my and my customers environment, running the Swedish version.
3. Is this happening to both dotx and docx, or just dotx?
Sorry, my mistake. The tested document is a docx.
4. Is this happening only on tables in header, or also in footer / document
body? (because I can't repro on all of them)
This does not happen i main document, and it seems to work in the footer,
and we have only seen it in the header.

Also, it seems important to only add som text directly after the original
one, as you can see in the sample.

Best Regards
 
P

Peter Karlström

Just to inform about the conclusion of this matter.

The problem and error described in this post, is a known Word 2007 bug, for
which a hotfix request now is on its way.

Hopefully Microsoft will deside to fix it.

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