Joined: 27 Jun 2010
|Posted: Mon Jun 28, 2010 12:11 am Post subject: Disable OpenOffice copy,save,print using VB code.
I am currently using Visual Basic to Program OpenOffice. I learnt some fundamentals like how to open a document. This is the code which I am using :::
Dim oSM, ODesk As Object
Dim oDoc As Objec
Dim OpenPar(3) As Object
oSM = CreateObject("com.sun.star.ServiceManager")
ODesk = oSM.createInstance("com.sun.star.frame.Desktop")
OpenPar(0) = MakePropertyValue("ReadOnly", False)
OpenPar(1) = MakePropertyValue("Password", "sec")
OpenPar(2) = MakePropertyValue("Hidden", False)
oDoc = ODesk.loadComponentFromURL("file:///c:/TEMP/new.odt", "_blank", 0, OpenPar)
Now, I want to go deeper so that I can disable copy, save, print options for a particular document.
Please help me with some hook ups since I am a newbie.
Thanks in advance.