Hi,

I'm trying to obtain the creation date of the currently open document. (an exception will probably be needed if the document has not been saved yet).

I can't seem to find how to do it. This is based on code where the document was loaded from a file.

Can somebody tell me where I went wrong?

Many thanks,

Jo

Sub InsertEurDate()

 dim odoc as object
 dim sCreationDate as string
 dim oDocCreationDate

 oDoc = createUnoService("com.sun.star.document.StandaloneDocumentInfo")
 oDoc=ThisComponent

 Xray oDoc

 oDocCreationDate = CreateUnoStruct ("com.sun.star.util.DateTime")
oDocCreationDate = oDoc.CreationDate() ' <- It tells me property or method not found

sCreationDate = oDocCreationDate.Day & "/" & oDocCreationDate.Month & "/" & oDocCreationDate.Year

 InsertDate(sCreationDate)
End Sub

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to