Kristian Rink wrote:
Folks;
(a) Reading some sources on that, I found that "FilterName" depends on
the application component used to open the file (Impress, Calc,
Writer, ...). However aren't .doc and .odt both opened by Writer?
They are both Write documents, yes
(b) Is there a complete list of values allowed for the "FilterName"
property available somewhere on the 'net?
Run this macro
Sub WriteFilterNamesToDoc
Dim oFF ' FilterFactory object.
Dim oFNames ' Filter names.
Dim oDoc ' Newly created Write document.
Dim oText ' Primary text object of new Write document.
Dim oCursor ' Text cursor into Text object.
Dim i As Integer
oFF = createUnoService( "com.sun.star.document.FilterFactory" )
oFNames = oFF.getElementNames()
' Create a Writer doc and save the filter names to it.
oDoc = StarDesktop.loadComponentFromURL( "private:factory/swriter",
"_blank", 0, Array() )
oText = oDoc.getText()
oCursor = oText.createTextCursor()
oCursor.gotoEnd( False )
' Print the filter names into a Writer document.
For i = LBound( oFNames ) To UBound( oFNames )
oText.insertString( oCursor, oFNames(i), False )
oText.insertControlCharacter( oCursor,
com.sun.star.text.ControlCharacter.PARAGRAPH_BREAK, False )
Next
End Sub
Thanks in advance and best regards,
Kristian
If you can not run the macro, email me directly and I will send a
complete list for you.
--
Andrew Pitonyak
My Macro Document: http://www.pitonyak.org/AndrewMacro.odt
My Book: http://www.hentzenwerke.com/catalog/oome.htm
Info: http://www.pitonyak.org/oo.php
See Also: http://documentation.openoffice.org/HOW_TO/index.html
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]