poi-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sanjeevatPOI <sanjeevkumar1...@gmail.com>
Subject unable to format the new paragraph added to the word doc..
Date Sun, 19 Jun 2011 14:26:35 GMT
Hi all,
I am unable to format the new paragraph added to the word doc. I am using
the code as
public void addPara()
        // centered paragraph with large font size
        Range range = doc.getRange();
        Paragraph par1 = range.insertAfter(new ParagraphProperties(), 0);
        par1.setJustification((byte) 1);
        // justification: 0=left, 1=center, 2=right, 3=left and right
        CharacterRun run1 = par1.insertAfter("one");
        run1.setFontSize(2 * 18);
        FileOutputStream fos=null;

            File file1=new File("D:/test/writetest.doc");
            fos=new FileOutputStream(file1);
        }catch(Exception ex)
            System.out.println("write error: "+ex);


niegther the code for formatting paragraph nor for character run is working.
Whtas happening? Please help,,,,

View this message in context: http://apache-poi.1045710.n5.nabble.com/unable-to-format-the-new-paragraph-added-to-the-word-doc-tp4503590p4503590.html
Sent from the POI - User mailing list archive at Nabble.com.

To unsubscribe, e-mail: user-unsubscribe@poi.apache.org
For additional commands, e-mail: user-help@poi.apache.org

View raw message