Word 2007 Insert File result different from Word 2003 Insert File

B

BillBQ

I've come across a problem with Word 2007 which is not inserting an .htm file
the same way as it did in Word 2003. The .htm content is inserted but it's
Word table font size is incorrect. In Word 2003 it came in with a Font size
of 11 but in Word 2007 it is a Font size of 10. Only the table has the wrong
font size, the rest of the inserted content is correctly sized.

This happens only when inserting the file to a plain .docx file or when I've
attached the .dotx file using UpdateStyles and then inserting the .htm. If
the .htm is inserted to a .docx file created directly from the same .dotx it
inserts with the correct font size in the table.

Any ideas? I could attach all the files but I don't know how to include
them in the post.

Thanks.
 
S

Stefan Blom

I'm guessing the table style font settings conflict somehow (but note that
table styles and font are a tricky business; see
http://www.shaunakelly.com/word/tablestyles/index.html). You could try
changing the settings in the Normal template (which "plain .docx" files are
based on).

In this case, since you have one template where it works properly, there is
an easier solution: use only that template when inserting the *.htm file.
 
B

BillBQ

Thanks for your response, Stefan. Unfortunately, I can't utilize the
approach of inserting with the launched template due to the way the VSTO
solution I have is designed. I must use the AttachTemplate approach. The
link does give me some more ideas, though.

So, I wonder if you could tell me what the difference is between opening a
Word document by double-clicking a .dotx file versus opening a .docx from
Normal.dotx and then attaching the other .dotx file with "update styles"?
Since these two approaches give different results there must be some
difference.
 
S

Stefan Blom

So, I wonder if you could tell me what the difference is between opening a
Word document by double-clicking a .dotx file versus opening a .docx from
Normal.dotx and then attaching the other .dotx file with "update styles"?
Since these two approaches give different results there must be some
difference.

There should be no difference, at least with paragraph and character styles.
Again, table styles make (font) formatting more difficult. Changing the
document default font (on the Set Defaults tab of the Manage Styles dialog
box) might improve the situation.
 
B

BillBQ

That did not improve the situation but it did change the font face of the
inserted content in the table cell. I'll post back an answer if I ever find
one. My goal is to eliminate the rogue Word table style that may have been
inadvertently added to the .htm content.

My table styles are these:
table.MsoNormalTable
{mso-style-name:"Table Normal";
mso-tstyle-rowband-size:0;
mso-tstyle-colband-size:0;
mso-style-noshow:yes;
mso-style-unhide:no;
mso-style-parent:"";
mso-padding-alt:0in 5.4pt 0in 5.4pt;
mso-para-margin:0in;
mso-para-margin-bottom:.0001pt;
mso-pagination:widow-orphan;
font-size:10.0pt;
font-family:"Times New Roman","serif";}
table.MsoTableGrid
{mso-style-name:"Table Grid";
mso-tstyle-rowband-size:0;
mso-tstyle-colband-size:0;
mso-style-unhide:no;
border:solid windowtext 1.0pt;
mso-border-alt:solid windowtext .5pt;
mso-padding-alt:0in 5.4pt 0in 5.4pt;
mso-border-insideh:.5pt solid windowtext;
mso-border-insidev:.5pt solid windowtext;
mso-para-margin:0in;
mso-para-margin-bottom:.0001pt;
mso-pagination:widow-orphan;
font-size:11.0pt;
font-family:"Times New Roman","serif";}

if my table tag starts: <table class=MsoTableGrid
it does not work and I get a font in my table sized 10.0.

However, if my table tag starts: <table class=MsoNormalTable...
it works perfectly. I get the table font of 11.0.

It's almost as if it was backwards of the two definitions.
 
S

Stefan Blom

If you don't mind, I would be interested in taking a look at the problem
documents (or relevant parts of them). You can send them to
(e-mail address removed).
 
B

BillBQ

Sorry Stefan, I never saw your reply until now. Are you still interested in
the files...if so, I'll reproduce it and send your way. ("Notify me of
replies" doesn't work too well)

We did find a work-around to the whole issue by removing one of the Table
styles from the original Word document. No one is exactly sure where the
style came from originally, though.
 
S

Stefan Blom

Well, you can send the file, but be sure to explain in your e-mail what the
problem is, since I don't remember this thread (and you didn't quote
anything from the previous discussion).
 
K

kveck1971

Well, you can send the file, but be sure to explain in your e-mail what the
problem is, since I don't remember this thread (and you didn't quote
anything from the previous discussion).

We found a solution to this problem by making sure the Normal style and the Document Default font in the document are identically set to Times New Roman size 10.

To set the Document Default Font --
1. Show the Styles task pane
2. Click on "Manage Styles" button at the bottom of the task pane
3. Click on Document Default tab on the Manage dialog
4. Set Font to Times New Roman, size 10pt

This made the issue with the font size changing in the table magically disappear.

Kris
 
S

Stefan Blom

Yes, that's the fix for issues with font formatting in tables (Word 2003 and
later). It doesn't make sense, but it works... :)
 

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