Mark-Up for MS Word

S

StephenMcC

Hi All,
I' not sure if this is the correct NG, couldn't seem to find another for
Word NG, but if there is another I should be using pls post...

So what I'm wondering is if Word has certain mark-up (like html) to specify
when bolding, underlineed should be used when generating a doc on the fly.

IE: if I wanted to create a HTML doc on the fly I'd use the <b> tag for
bolding for example... So Im wondering if Word has something similar for such
mark-up.

I know I can push HTML down vai the request and get IE to open this in Word
(by adding certain headers to the request), but in my case I wish to save the
file directly to disk and / or attach to an email.

Any ideas, comments most welcome. Thx!
 
G

Graham Mayor

Generating a doc on the fly? From where?
Word formats documents using styles and formatting parameters that equate to
manual formatting.
e.g from vba at its simplest

With Selection
.Style = "Heading 1"
.TypeText "This is a piece of text"
.TypeParagraph
.Style = "Body Text"
.TypeText "This is some more text "
.Font.Bold = True
.TypeText "This text is bold "
.Font.Bold = False
.TypeText "and this isn't etc"
End With

http://www.gmayor.com/installing_macro.htm
--
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
Graham Mayor - Word MVP


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

Jay Freedman

StephenMcC said:
Hi All,
I' not sure if this is the correct NG, couldn't seem to find another
for Word NG, but if there is another I should be using pls post...

So what I'm wondering is if Word has certain mark-up (like html) to
specify when bolding, underlineed should be used when generating a
doc on the fly.

IE: if I wanted to create a HTML doc on the fly I'd use the <b> tag
for bolding for example... So Im wondering if Word has something
similar for such mark-up.

I know I can push HTML down vai the request and get IE to open this
in Word (by adding certain headers to the request), but in my case I
wish to save the file directly to disk and / or attach to an email.

Any ideas, comments most welcome. Thx!

If you use asterisks to mark the start and end of text that should be
*bold*, and underscores for _italic_, then Word's AutoFormat command will
change those to the actual formatting (assuming that option is turned on, in
the AutoFormat tab of the AutoCorrect Options dialog). There is no such
markup for underlining.

--
Regards,
Jay Freedman
Microsoft Word MVP
Email cannot be acknowledged; please post all follow-ups to the newsgroup so
all may benefit.
 

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