You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@poi.apache.org by johsve339 <jo...@hotmail.com> on 2011/04/11 15:04:10 UTC
Change default file save possible?
Hi
Is there a way to change the defualt save location with a property in the
template file?
I know it's possible with a macro like this:
Sub AutoNew()
ChangeFileOpenDirectory 'your path'
End Sub
However, I would loke do add i dynamically, which is not possible with a
macro.
--
View this message in context: http://apache-poi.1045710.n5.nabble.com/Change-default-file-save-possible-tp4295885p4295885.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
Re: Change default file save possible with XWPFDocument?
Posted by Mark Beardsley <ma...@tiscali.co.uk>.
My first thought was to modify the file's properties -
http://poi.apache.org/apidocs/org/apache/poi/POIXMLProperties.html - but I
do not think that will achieve what you are after and I was not going to
post a reply. However, whilst I was having a quick look at the properties, I
noticed a method called setContentType() -
http://poi.apache.org/apidocs/org/apache/poi/POIXMLProperties.CoreProperties.html#setContentType%28java.lang.String%29
- and was reminded of your earlier question re opening a template file
(dofx) and saving it as a document (docx). Sadly, I will not be able to test
this myself but think it might be worth your taking a look at. Cannot
promise it will work but it might.
Back to the default save location, I think the first thing to do is to nail
down where this information is saved in the file. I don not know the answer
to this and feel that you may need to plough through the file format
specification or seach MSDN for the answer. Once you know where it is
stored, then it might be possible to modify the value.
Yours
Mark B
--
View this message in context: http://apache-poi.1045710.n5.nabble.com/Change-default-file-save-possible-with-XWPFDocument-tp4295885p4296097.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