Ladies and Gentlemen
We’re currently evaluating Aspose.Words for Java 4.0.0 BETA. So far, it seems to perfectly fit our needs, one question remains though: is it possible to access custom autotext-entries stored in a word-template (accessible through menu “insert → Autotext → Autotexts…”). So far, I didn’t manage to access any custom autotext-entry when opening a template that originally was created with MS Word 2003 SP3, here’s my code trying to achieve this (also see attached “sample.dot”):
private void createDocumentFromTemplateTest() throws Exception
{
Document doc = new Document("C:\\sample.dot");
GlossaryDocument gdoc = doc.getGlossaryDocument();
if (gdoc != null)
{
// this code is never reached
System.*out * .println("building blocks: ");
for (BuildingBlock block: gdoc.getBuildingBlocks())
{
System.*out * .println(" " + block.getName());
}
}
else
{
System.*out * .println("building blocks: none");
}
}
I’ve found a post in the internet stating that GlossaryDocuments were only accessible in DOCX format. What’s the exact status on this subject? Are Autotexts accessible? If yes, in which word versions or formats? If not, is an implementation of this planned?
I’d really appreciate your help and am looking foward to hearing from you soon.
Sincerely
Mike
This message was posted using Email2Forum by alexey.noskov.