I trying change Printer before send print command to my OO Doc.
My code is :
Code: Select all
Function printMyDoc(aPrinterName)
Dim oPropertyValue(0) AS New com.sun.star.beans.PropertyValue
Dim oDoc
Dim oSettings
Dim oPrinterSettings(0) As New com.sun.star.beans.PropertyValue
oDoc = ThisComponent
oPrinterSettings(0).Name = "Name"
oPrinterSettings(0).Value = aPrinterName
oDoc.Printer = oPrinterSettings
oPropertyValue(0).Name = "CopyCount"
oPropertyValue(0).Value = 1
oDoc.Print(oPropertyValue())
End Function
Code: Select all
oPrinterSettings(0).Name = "Name"
oPrinterSettings(0).Value = aPrinterName
oDoc.Printer = oPrinterSettings
Anybody knows whats i did wrong?