Paragraph Style for Programming Code

G

gmeazell

I have an assignment to go through several large documents full of
Java programming code in order to make them more readable. So, I have
code that looks like this:

for (x=0; x<y; x++)
{
z=var.performSomeFunction();
}

I would like to do something in Word that would automatically format
it properly:

for (x=0; x<y; x++)
{
z=var.performSomeFunction();
}

My first thought was paragraph styles and while that gave me some of
the functionality I wanted, it did not give me the ability to
automatically indent things the way one would see it in a program
editor.

The basic idea here is that formatting of each line would be based on
what happened on the previous line.

Does anyone know of a way to do this? I have used macros in Excel, but
not in Word so if that's the way I need to go, I will but a little
hand-holding would be appreciated.

Thanks,
 

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