Need help using CSS style sheets to create web pages in Word

J

John McGhie [MVP - Word and Word Macintosh]

Hi Corentin:

It was :) That's where I copied it from :)

What I meant was "You have to specify the encoding you want in File>Save As
Web Page">Web Options>Encoding..."

If you do, the line I copied will appear in the Head element of the HTML
source Word saves.

I am using a Post-SP2 version of Word 2004. And I specified Unicode. If I
specify Western European (Macintosh) I get:
<meta http-equiv=Content-Type content="text/html; charset=macintosh">

I wonder if this was fixed in SP 2?

Cheers

Indeed. It's very simple and I can't believe that even though the
problem has been reported ages ago no correction ever came for that.
That should definitively be added by Word.

Corentin

--

Please reply to the newsgroup to maintain the thread. Please do not email
me unless I ask you to.

John McGhie <[email protected]>
Microsoft MVP, Word and Word for Macintosh. Consultant Technical Writer
Sydney, Australia +61 4 1209 1410
 
D

Daiya Mitchell

Okay. You can also get to that dialog via Word | Preferences | General, Web
Options.

I tried to set encoding to UTF-8, but every time I clicked on a different
panel and went back, it had reset to Macintosh. So apparently you can't set
a default. (SP2 v.1) Long time ago, I'm also quite sure I had checked the
box to *not* update links on save, which is similarly resetting itself.
 
C

Corentin Cras-Méneur

Daiya Mitchell said:
I tried to set encoding to UTF-8, but every time I clicked on a different
panel and went back, it had reset to Macintosh. So apparently you can't set
a default. (SP2 v.1) Long time ago, I'm also quite sure I had checked the
box to *not* update links on save, which is similarly resetting itself.


Yeah, to be honest, I'd like Word to use UTF-8 as default in any case
(unless the document is using 2-byte characters in which case it'd need
UTF-16).

Corentin
 
C

Corentin Cras-Méneur

John McGhie said:
Hi Corentin:

Hi John,
It was :) That's where I copied it from :)

I'm in shock!!!! I tried it as well (with and without selecting the
proper options for web pages) and in both cases now the accent appear
correctly in all browsers.

What I meant was "You have to specify the encoding you want in File>Save As
Web Page">Web Options>Encoding..."

If you do, the line I copied will appear in the Head element of the HTML
source Word saves.

Indeed. and if you don't specify anything, the header now says:
<meta http-equiv=Content-Type content="text/html; charset=macintosh">
which (at least on a Mac) is OK too.
The document still won't pass the W3C validator (the doctype is missing
and that's a big no-no for them), but the header look like they have
more information than they ever did before.
I am using a Post-SP2 version of Word 2004. And I specified Unicode. If I
specify Western European (Macintosh) I get:
<meta http-equiv=Content-Type content="text/html; charset=macintosh">

I wonder if this was fixed in SP 2?

I clearly, clearly don't remember this from previous versions and I
always had pages showing funky characters instead of the properly
accented letters. This is huge !!!
I use to hate Word html because it simply didn't work for me, now I just
dislike it (or better: I'd rather find other options to generate simpler
code) but I don't find anything really wrong with it anymore.
I can't believe this!!! I think I'm going to need a few minutes to get
over the news...
Thanks a million for pointing this out.

Corentin
 
J

John McGhie [MVP - Word and Word Macintosh]

I don't know why the default did not save for Daiya, it did for me. I had
to change it from UTF-8 to produce the Macintosh example...

I wonder if Daiya has a munged preference?


Yeah, to be honest, I'd like Word to use UTF-8 as default in any case
(unless the document is using 2-byte characters in which case it'd need
UTF-16).

Corentin

--

Please reply to the newsgroup to maintain the thread. Please do not email
me unless I ask you to.

John McGhie <[email protected]>
Microsoft MVP, Word and Word for Macintosh. Consultant Technical Writer
Sydney, Australia +61 4 1209 1410
 
J

John McGhie [MVP - Word and Word Macintosh]

Hi Corentin:

You're welcome :)

I really haven't kept up with the DOCTYPE argument, but I had always thought
it was acceptable coding practice to omit it, which invites the browser to
default to the built-in "implied" DOCTYPE.

I seem to remember that potentially produces a faster page load, because the
browser doesn't then have to go back for the DTD. That's why I never
bothered adding a DOCTYPE to the pages at www.word.mvps.org. That and
laziness...

Examining the header that Word writes, we see it is specifying an XML name
space. If it does that, I would have thought the DOCTYPE was redundant?

Don't know...

Hi John,


I'm in shock!!!! I tried it as well (with and without selecting the
proper options for web pages) and in both cases now the accent appear
correctly in all browsers.



Indeed. and if you don't specify anything, the header now says:
<meta http-equiv=Content-Type content="text/html; charset=macintosh">
which (at least on a Mac) is OK too.
The document still won't pass the W3C validator (the doctype is missing
and that's a big no-no for them), but the header look like they have
more information than they ever did before.


I clearly, clearly don't remember this from previous versions and I
always had pages showing funky characters instead of the properly
accented letters. This is huge !!!
I use to hate Word html because it simply didn't work for me, now I just
dislike it (or better: I'd rather find other options to generate simpler
code) but I don't find anything really wrong with it anymore.
I can't believe this!!! I think I'm going to need a few minutes to get
over the news...
Thanks a million for pointing this out.

Corentin

--

Please reply to the newsgroup to maintain the thread. Please do not email
me unless I ask you to.

John McGhie <[email protected]>
Microsoft MVP, Word and Word for Macintosh. Consultant Technical Writer
Sydney, Australia +61 4 1209 1410
 
D

Daiya Mitchell

I might could...

Nope, it's a munged testing technique. If I change the encoding, flip to
the Files panel, then back to the Encoding panel, it resets to the original.
If I change the encoding, then exit to the doc, then go back to the Web
Options dialog, it's got the change remembered--and still resets to the new
options if I make a change then flip panels. (that is weird behavior,
still)

The preference appears to be holding at UTF-8 now. And now I think I
re-checked the "update links at save" to test some IncludeText fields.

Incidentally, I've been using the computer for a year and just now
discovered I can move files by dragging them onto the icon on the toolbar in
the Finder window. Oh well.
 
C

Corentin Cras-Méneur

Daiya Mitchell said:
Incidentally, I've been using the computer for a year and just now
discovered I can move files by dragging them onto the icon on the toolbar in
the Finder window. Oh well.


:-D Better now than never :)
You want nother trick?? To force-open a file in an application
thatwouldn't recognize it as its own normally, command-alt drag it to
its icon in the Dock :)


Corentin
 
C

Corentin Cras-Méneur

John McGhie said:
Examining the header that Word writes, we see it is specifying an XML name
space. If it does that, I would have thought the DOCTYPE was redundant?

Don't know...

I'm not so sure it is redundant. Having XML content is one thing, but by
not specifying what Doctype you use, you force the browser to guess (and
potentially make mistakes) about the structure of the file.
I also suspect you can have XML content in more than one type of
HTML/XHTML doctypes.

Corentin
 
S

Shelley

John-
Thanks for the wisdom, when you said: ") The point I am trying to make
is that Word is not trying to make"web pages", and never was. Word is
trying to store your document in a format 
that can be read by a
modern web browser. "

And, that's what I have done in the past, and use Word for now, for
temporary web sites, or simple pages that can be read by web browsers.
This time, I wanted to add a bit more design, using CSS. I will
definitely try your approach that you detailed in your posting, and I
see that others are interested in that as well. I have downloaded nvu
and will try that as well.

I often see examples in my work of what goes on in the tech/software
world you describe. My world is working with organizations and people
to help them improve their effectiveness. I often run into situations
where everyone knows and agrees that something is wrong, but, rather
than fix it, the managers decide they have to do a survey to find out
what is really wrong. Months go by, the survey tells us what we already
knew, then a taskforce has to come up with recommendations, and its now
a year later and everyone is tired of this, but the people at the front
line have figured out what they needed to do and informally put it into
place before the corporate team could make its recommendations. And,
the formal task force never seems to do it as well or with as much
passion as those on the line.

It's always good to take a step back and look around before you go
forward again. I think I'm done with this one for now.

Many Thanks,

Shelley Robbins
 

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