"Preserve formatting during updates", superscript and tables (Word2003)

J

Jacek

Hi All,

There is a rather annoying bug in the way Word 2003 (SP2) handles
updates to linked tables with 'Preserve formatting during update'
option turned on. If you include a table as a link and then update the
field all superscript and subscript formatting in the table sells gets
removed.
That means that all references to footnotes get scrambles but what
even worse all 10^9 and 10^6 get replaced by 109 and 106 and so on.
Is there any work-around or (hot)fix for this bug?

Thanks,
Jacek
 
G

Graham Mayor

I cannot reproduce this problem. Can you explain *exactly* how you have
linked the tables and from where.

--
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
Graham Mayor - Word MVP


<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
 
J

Jacek

Thank you Graham,

Create a document with a table. In one of the cells insert text with
some part of it in superscript. (i.e. 10^9, ten with 9 in superscript)

From another document:
In the Insert->File select the previously created document and choose
the Insert as Link option.
Right click on the field representing included document and select
Edit Field
Check Preserve formatting during updates checkbox and click OK
(The cell with the superscript still looks OK)
Right click on the same field and select Update Field. The text in the
superscript format changes to normal script.

BTW the same happens to the text outside of a table as well.

Thanks,
Jacek
 
G

Graham Mayor

OK I see your point. The simple solution is to toggle the field (ALT+F9) and
remove the \*Mergeformat switch and update the field. The superscript will
be restored.
Frankly I don't know why Microsoft chose to add the mergeformat switch by
default. It rarely works as you might imagine.

--
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
Graham Mayor - Word MVP


<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
 
J

Jacek

Thanks Graham,

Do you know if there is a chance Microsoft would fix this? This little
scenario of mine represents the way the documents are prepared at the
shop that I work for. One department produces results in the form of
tables. The other department uses the produced tables in the final
documents. The Tables sometimes have to be regenerated, thus the need
to have them included as links. The problem is that although the
include file as link creates fields without MERGEFORMAT, any
manipulation of the included table silently adds that option. As an
example that happens if the member of the second group changes the
size of the font in the linked table. To make the this matter worse
unless you update the links everything looks OK (I.e. the table with
the larger font still has the proper text in the superscript). After
one updates the link the table looses the superscript, but not the
changed font size.
I think previous versions of Word handled this better and only 2003
and maybe XP have this problem.(I do not have Office 2007 so I cannot
tell if the new Word has this problem or not).
Any chance somebody from Microsoft could comment on this problem?

Thanks,
Jacek
 
G

Graham Mayor

I cannot imagine any circumstances where modifying a linked file will add a
switch to a field in the document, and I have not yet found a way to force
it to do so. Can you describe *exactly* the steps that you take that make
this happen? Is the switch being added by a macro?

If it is correct that you can produce circumstances where such a switch is
added, then it is a simple matter to remove the switch using a macro.

Sub ClearSwitch()
Dim oRng As Range
Dim iFld As Integer
Selection.HomeKey
ActiveDocument.ActiveWindow.View.ShowFieldCodes = True
For iFld = ActiveDocument.Fields.Count To 1 Step -1
With ActiveDocument.Fields(iFld)
If .Type = wdFieldIncludeText Then
If InStr(1, .Code, "MERGEFORMAT") <> 0 Then
.Code.Text = Replace(.Code.Text, "\* MERGEFORMAT", "")
End If
.Update
End If
End With
Next iFld
ActiveDocument.ActiveWindow.View.ShowFieldCodes = False
End Sub

Note that this is a user peer goup, it is not served by Microsoft.


--
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
Graham Mayor - Word MVP


<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
 
J

Jacek

Thanks Graham,

Here we go(the steps are similar to the ones from my previous
example):
In document A create a table with some text in superscript.
In document B create a field that links to the document A
Verify that the field code in document B does not contain MERGEFIELD
modifier.
In document B highlight the table from document A
Change the font size for the selection.
Verify that the field code now contains MERGEFIELD modifier.

Eventually I have provided the users with a macro to remove MERGEFIELD
before link update and unlink operations but as I mentioned earlier I
think that such steps should be unnecessary. The original change-of-
font-size works, and the superscript does not disappear. Only the
consecutive update field breaks it. It seems like a bug in the update
field implementation thus my question if Microsoft looks at this
group.

Thanks,
Jacek
 
G

Graham Mayor

I have followed your instructions, which echo what I have tried before (in a
fully updated copy of Word 2003), and no switch is added to the field here.

The field is { INCLUDETEXT "D:\\My Documents\\Test\\Versions\\Even\\This is
a test.doc" }
before and after updating/making changes to the linked document.

If you start Word in its safe mode (hold CTRL while starting and acknowledge
the ensuing prompt) does the problem still arise?


--
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
Graham Mayor - Word MVP


<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
 
J

Jacek

Hi Graham,

The same happens in the safe mode. I think, you are changing the wrong
document.
In the scenario the source document (called document A) once createds
is never changed.
All operations are performed in document B, the one with the field.
The change in the font size is also performed in document B.

Thanks,
Jacek
 
G

Graham Mayor

OK, I see what you mean. I think this is not so much a bug as a design
limitation, inevitable if you make changes to the contents of fields. FWIW,
the superscript is not lost (though the switch is added) if you perform the
same operation in Word 2007.

--
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
Graham Mayor - Word MVP


<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
 

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