Header misaligned when saving file as a .doc file
Posted: Thu Jun 26, 2014 9:48 am
Hello,
I have a scenario which was working in OOO 2.*, but doens't seem to be working in OOO 3.*.
The question is posted in the following link. viewtopic.php?f=7&t=70632&p=316412#p316412
Will Briefly describe the problem here.
I have a code snippet which prepares data, uses a templates(*.doc) and replaces the data with the necessary contents. Once done the file is saved as *.doc.
Earlier(in OOO 2.*) the file was saving as expected and the header was aligned as expected. Now( in OOO 3.*) the header is getting misaligned.
I can resolve the issue by saving the file as .odt and then convert into *.doc as opposed to directly saving as *.doc, but the file cannot be opened using Microsoft 2007. I get the following error "Word cannot start the converter mswrd632.wpc". Though that can also be resolved by deleting a registry entry, I do not wanna do that as many other windows based apps run on the machine and the after effects could be anything.
The file is being generated using a java code and have pasted the snippet below.
I need to find an alternative wherein the *.doc file gets saved without the header misalignment and also it should open using Windows 2007.
Can anyone who have faced the issue please help me out here. The suggestions mentioned in the above mentioned link does not work.
I have a scenario which was working in OOO 2.*, but doens't seem to be working in OOO 3.*.
The question is posted in the following link. viewtopic.php?f=7&t=70632&p=316412#p316412
Will Briefly describe the problem here.
I have a code snippet which prepares data, uses a templates(*.doc) and replaces the data with the necessary contents. Once done the file is saved as *.doc.
Earlier(in OOO 2.*) the file was saving as expected and the header was aligned as expected. Now( in OOO 3.*) the header is getting misaligned.
I can resolve the issue by saving the file as .odt and then convert into *.doc as opposed to directly saving as *.doc, but the file cannot be opened using Microsoft 2007. I get the following error "Word cannot start the converter mswrd632.wpc". Though that can also be resolved by deleting a registry entry, I do not wanna do that as many other windows based apps run on the machine and the after effects could be anything.
The file is being generated using a java code and have pasted the snippet below.
Code: Select all
XComponent document= doc.createDoc("***", templateDir+"/"+templateLocName,***,****,AsOfDate);
XStorable storable = (XStorable) UnoRuntime.queryInterface(XStorable.class, document);
PropertyValue[] properties = new PropertyValue[2];
PropertyValue p = new PropertyValue();
p.Name = "FilterName";
p.Value = format.getFormatCode();
properties[0] = p;
String loadURL = "file:///"+System.getProperty("*******")+"/"+fileName;
storable.storeToURL(loadURL, properties);
Can anyone who have faced the issue please help me out here. The suggestions mentioned in the above mentioned link does not work.