Hi,
I generate on the fly documents with the OpenOffice API.
Now I want to add some properties to my doc files as author, title ...
As well this properties should be visible in a PDF that I generated from my doc files with the OpenOffice API.
Any Ideas?
Regards,
giciorek
Add properties to document like: author, title
Add properties to document like: author, title
OpenOffice 3.3 on x64
-
andyroberts1234
- Posts: 75
- Joined: Fri Feb 11, 2011 2:29 pm
Re: Add properties to document like: author, title
Quick search of the API on google found this...never used it before but should lead you to the right way http://api.openoffice.org/docs/common/r ... rties.html
Andy
OOO 3.3.0 / Windows 7 64-bit
OOO 3.3.0 / Windows 7 64-bit
Re: Add properties to document like: author, title
Ok thanks.
But how to access this properties when I only have the XComponent object?
Can't find any samples.
But how to access this properties when I only have the XComponent object?
Can't find any samples.
OpenOffice 3.3 on x64
Re: Add properties to document like: author, title
Why not enter the Author details into your Default template?
Apache OpenOffice 4.1.16 on Xubuntu 24.04.4 LTS
Re: Add properties to document like: author, title
In Basic.
Code: Select all
Sub DocInfo
oDoc = ThisComponent
oVC = oDoc.CurrentController.getViewCursor
Info = oDoc.getDocumentInfo
'Other info is available at .getDocumentProperties
oVC.String = Info.Title
oVC.collapseToEnd
oDoc.Text.insertControlCharacter(oVC,0,false)'Paragraph break.
oVC.String = Info.Author
oVC.collapseToEnd
End Sub