[Solved] Docx and networked file

Java, C++, C#, Delphi... - Using the UNO bridges
Post Reply
ronanf
Posts: 2
Joined: Wed Mar 04, 2009 6:18 pm

[Solved] Docx and networked file

Post by ronanf »

Hi,

I'm currently using OO 3.0.1. I have an issue with sending docx files to OO.

This block of code will work if the file being sent is relative to the server:

(e.g. sourceDocument = "file///c:/test.docx"):

Code: Select all

   
PropertyValue[] propVal = new PropertyValue[1];
propVal[0] = new PropertyValue();
propVal[0].Name = "FilterName";
propVal[0].Value = "Microsoft Word 2007 XML";

xcomponent = xcomponentloader.loadComponentFromURL(sourceDocument, "_blank", 0, propVal );
However this will not work if the sourcedocument path is network relative (e.g. sourcedocument = "file://///pcname/ImageTmp$/ImageTmp.10135230.null")

The above example does work for all other document types I have tried, i.e doc/xls/ppt/xlsx/pptx.

Any ideas?
Last edited by Hagar Delest on Thu Mar 05, 2009 12:55 pm, edited 1 time in total.
Reason: tagged [Solved].
OOo 3.0.X on Ms Windows XP
ronanf
Posts: 2
Joined: Wed Mar 04, 2009 6:18 pm

Re: Docx and networked file

Post by ronanf »

Simple solution to this in the end. For some reason other formats do not require the correct file extension (.null). However docx appears to be a special case and does.

Once I used "file://///pcname/ImageTmp$/ImageTmp.10135230.docx" the URL was accepted.
OOo 3.0.X on Ms Windows XP
Post Reply