Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Word / Long Documents / December 2005

Tip: Looking for answers? Try searching our database.

Setting up Tabs and Indentation to write programs in Word.

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Anand - 10 Dec 2005 03:33 GMT
Hi,

Is it possible to set up a style that is convenient for writing programs in
MS Word ? In particular, I have two requirements not satisfied by the "Plain
Text" style:
1) I want the tab key to correspond to 4 spaces
2) When say enter from a given line, the cursor should position itself where
the previous line started, with spaces upto that point. To understand my
context, the code I want to type out is going to look like this:
FunctionName() {
   Line1();
   Line2();
}

Any help or pointers most appreciated.

Thanks,
Anand.
Doug Robbins - Word MVP - 10 Dec 2005 09:10 GMT
Create a style in which you have the paragraph formatted with tabs and
indents that meet your requirements.  You will also need to define the font
used by the style to a non-proportional spaced font (such as Courier New)

Signature

Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP

> Hi,
>
[quoted text clipped - 17 lines]
> Thanks,
> Anand.
Anand - 12 Dec 2005 19:50 GMT
Hi Doug,

Actually my question was about how to setup such a Style - the options under
"Modify Style" dont let me set up the two parameters I have indicated below.
For example, I cannot seem to replace tabs with spaces. And when I hit
"enter" I would like for the cursor to not go to the left margin as it does
now (say in Plain Text).

Thanks,
Anand.

> Create a style in which you have the paragraph formatted with tabs and
> indents that meet your requirements.  You will also need to define the font
[quoted text clipped - 21 lines]
> > Thanks,
> > Anand.
Suzanne S. Barnhill - 12 Dec 2005 20:51 GMT
I think Doug's point is that if you use a monospaced font, you can set a tab
stop equivalent to a certain number of spaces. For example, 12 pt Courier
New is equivalent to 10 pitch, so half an inch equals five spaces. But
instead of using spaces OR tabs to indent the text, use an indent or hanging
indent. For the example you gave

FunctionName() {
   Line1();
   Line2();

you an use a style with a hanging indent at the position where you want
Line1 and Line2. Instead of pressing Enter, press Shift+Enter to insert a
line break.

Signature

Suzanne S. Barnhill
Microsoft MVP (Word)
Words into Type
Fairhope, Alabama USA
Word MVP FAQ site: http://word.mvps.org
Email cannot be acknowledged; please post all follow-ups to the newsgroup so
all may benefit.

> Hi Doug,
>
[quoted text clipped - 32 lines]
> > > Thanks,
> > > Anand.
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.