poi-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alexander_Muravyev <Alexandr.Murav...@gmail.com>
Subject HWPF replace hyperlinks
Date Thu, 21 Oct 2010 14:17:36 GMT

Hi!
I need replace all hyperlinks in Microsoft Word 2003 document.
I try to do it through code:

InputStream is = new FileInputStream(new File("test.doc"));
HWPFDocument doc = new HWPFDocument(is);
doc.getRange().replaceText("http://www.google.ru/", "http://www.ya.ru/");
OutputStream out = new FileOutputStream(new File("test01.doc"));
doc.write(out);
out.close();

but execute program, I can't read new file.
Anyone can help me? Any advices, comments...
-- 
View this message in context: http://apache-poi.1045710.n5.nabble.com/HWPF-replace-hyperlinks-tp3230577p3230577.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


Mime
View raw message