making a paragraph bold

Z

zscipio

Version: 2004 Operating System: Mac OS X 10.6 (Snow Leopard) Processor: Intel I wrote a Java program that writes data to a file that MS Word is going to read. So the name of the file is text.doc.

Whenever a new paragraph is needed \r\n is written to text.doc.
Whenever a new page is needed \f is written to text.doc.

Are the any controls that can be written before a paragraph to cause it to be bold?
Are the any controls that can be written before a paragraph to cause it to be center justified?
Are the any controls that can be written before a paragraph to change its font size?

After text.doc is written it is closed & opened by MS Word.

Thank you for your help.
 
J

John_McGhie_[MVP]

Write the file in HTML and you have all the controls you would like.

In .txt there are no formatting controls at all.

An HTML file can be very simple indeed: provided it has a .htm extension
Word will do what you want.

Cheers


Version: 2004 Operating System: Mac OS X 10.6 (Snow Leopard) Processor: Intel
I wrote a Java program that writes data to a file that MS Word is going to
read. So the name of the file is text.doc.

Whenever a new paragraph is needed \r\n is written to text.doc.
Whenever a new page is needed \f is written to text.doc.

Are the any controls that can be written before a paragraph to cause it to be
bold?
Are the any controls that can be written before a paragraph to cause it to be
center justified?
Are the any controls that can be written before a paragraph to change its font
size?

After text.doc is written it is closed & opened by MS Word.

Thank you for your help.

--

The email below is my business email -- Please do not email me about forum
matters unless I ask you to; or unless you intend to pay!

John McGhie, Microsoft MVP (Word, Mac Word), Consultant Technical Writer,
McGhie Information Engineering Pty Ltd
Sydney, Australia. | Ph: +61 (0)4 1209 1410 | mailto:[email protected]
 

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