LOULOU Posted December 17, 2005 Share Posted December 17, 2005 Has anyone trying to use an open office object and haviong code for dealing with this object ? Thanks Link to comment Share on other sites More sharing options...
GodandRock Posted December 17, 2005 Share Posted December 17, 2005 wat do u mean wen u say "open office"??? [font="Fixedsys"][size="3"][u][font="Franklin Gothic Medium"] [/font][/u][/size][/font] Link to comment Share on other sites More sharing options...
herewasplato Posted December 17, 2005 Share Posted December 17, 2005 wat do u mean wen u say "open office"???http://www.openoffice.org/ [size="1"][font="Arial"].[u].[/u][/font][/size] Link to comment Share on other sites More sharing options...
JSThePatriot Posted December 17, 2005 Share Posted December 17, 2005 Excellent Program!! I havent used it with AutoIt. AutoIt Links File-String Hash Plugin Updated! 04-02-2008Â Plugins have been discontinued. I just found out. ComputerGetInfo UDF's Updated! 11-23-2006 External Links Vortex Revolutions Engineer / Inventor (Web, Desktop, and Mobile Applications, Hardware Gizmos, Consulting, and more) Link to comment Share on other sites More sharing options...
DaleHohm Posted December 17, 2005 Share Posted December 17, 2005 Has anyone trying to use an open office object and haviong code for dealing with this object ?Thanks"object"? Are you suggesting that OOo has a COM interface? Being cross-platform I didn't expect that to ever be the case... if you know differently, please provide a pointer to more information.Thanks,Dale Free Internet Tools: DebugBar, AutoIt IE Builder, HTTP UDF, MODIV2, IE Developer Toolbar, IEDocMon, Fiddler, HTML Validator, WGet, curl MSDN docs: InternetExplorer Object, Document Object, Overviews and Tutorials, DHTML Objects, DHTML Events, WinHttpRequest, XmlHttpRequest, Cross-Frame Scripting, Office object model Automate input type=file (Related) Alternative to _IECreateEmbedded? better: _IECreatePseudoEmbedded Better Better? IE.au3 issues with Vista - Workarounds SciTe Debug mode - it's magic: #AutoIt3Wrapper_run_debug_mode=Y Doesn't work needs to be ripped out of the troubleshooting lexicon. It means that what you tried did not produce the results you expected. It begs the questions 1) what did you try?, 2) what did you expect? and 3) what happened instead? Reproducer: a small (the smallest?) piece of stand-alone code that demonstrates your trouble Link to comment Share on other sites More sharing options...
themax90 Posted December 17, 2005 Share Posted December 17, 2005 I used Open Office but there isn't quite as much documentation as Excel, Word, etc. I would suggest using microsoft products until you know the basic interface, because OOo probably has the same configuration with less relaiblity. I am not sure, just an idea. Link to comment Share on other sites More sharing options...
Valik Posted December 17, 2005 Share Posted December 17, 2005 I used Open Office but there isn't quite as much documentation as Excel, Word, etc. I would suggest using microsoft products until you know the basic interface, because OOo probably has the same configuration with less relaiblity. I am not sure, just an idea.Let me make sure I understand you correctly. You're saying use software that costs a few hundred dollars, get used to it, then migrate to free software which is going to be similar but probably not 100% identical. So you're suggesting to throw away both time and money? Did I miss the sign at the door that said "Welcome to Backwards Land"? Link to comment Share on other sites More sharing options...
Francis Lennert (France) Posted December 18, 2005 Share Posted December 18, 2005 Hello LOULOU,You can use OOffice and the Beta version of AutoIt (with the COM support).Here is a not perfect first example to show you how to launch OO.Dim $MyArg $oSM= ObjCreate("com.sun.star.ServiceManager") if IsObj( $oSM ) Then $oDSK= $oSM.createInstance("com.sun.star.frame.Desktop") if IsObj($oDSK) Then Else MsgBox(0," Not Connected"," $oDSK ") Exit EndIf Else MsgBox(0," Not Connected"," $oSM ") Exit EndIf $oDOC= $oDSK.loadComponentFromURL("private:factory/swriter","_blank", 0 , $MyArg)I still have a problem with the last line and I suppose that it is with the last parameter.C:\Documents and Settings\Administrateur\Bureau\Autoit\dc.au3 (16) : ==> The requested action with this object has failed.: $oDOC= $oDSK.loadComponentFromURL("private:factory/swriter","_blank", 0 , $MyArg) $oDOC= $oDSK.loadComponentFromURL("private:factory/swriter","_blank", 0 , $MyArg)^ ERRORThe OO Api documentation explains how to use this Method and I have tried a few solutions but nothing works.Any help would make my day better,Francis Link to comment Share on other sites More sharing options...
LOULOU Posted December 18, 2005 Author Share Posted December 18, 2005 Hello LOULOU, You can use OOffice and the Beta version of AutoIt (with the COM support). Here is a not perfect first example to show you how to launch OO. Dim $MyArg $oSM= ObjCreate("com.sun.star.ServiceManager") if IsObj( $oSM ) Then $oDSK= $oSM.createInstance("com.sun.star.frame.Desktop") if IsObj($oDSK) Then Else MsgBox(0," Not Connected"," $oDSK ") Exit EndIf Else MsgBox(0," Not Connected"," $oSM ") Exit EndIf $oDOC= $oDSK.loadComponentFromURL("private:factory/swriter","_blank", 0 , $MyArg) I still have a problem with the last line and I suppose that it is with the last parameter. C:\Documents and Settings\Administrateur\Bureau\Autoit\dc.au3 (16) : ==> The requested action with this object has failed.: $oDOC= $oDSK.loadComponentFromURL("private:factory/swriter","_blank", 0 , $MyArg) $oDOC= $oDSK.loadComponentFromURL("private:factory/swriter","_blank", 0 , $MyArg)^ ERROR The OO Api documentation explains how to use this Method and I have tried a few solutions but nothing works. Any help would make my day better, FrancisHello Francis, Thanks to respond me. I have the same problem at the same line. I propose to create a thread on Open Office. In fact my problem is the following, I want to write a program which uses Microsoft excel and macros and i find a free way to port mu program with autoit. What Do you think about opening a new thread ? Link to comment Share on other sites More sharing options...
Francis Lennert (France) Posted December 18, 2005 Share Posted December 18, 2005 It could be a good thing. I really wants to have the solution for our (common now) problem.I often use AutoIt in COM solutions and I would like to understand why we have this "The requested action with this object has failed.:" Regards, Francis Link to comment Share on other sites More sharing options...
LOULOU Posted December 18, 2005 Author Share Posted December 18, 2005 It could be a good thing. I really wants to have the solution for our (common now) problem.I often use AutoIt in COM solutions and I would like to understand why we have this "The requested action with this object has failed.:" Regards, FrancisI find the solution. Try this code it walks. It's open a new doc in a new windows Dim $OpenPar[3] Global $setOOoProp ;Instancie OOo : ces deux lignes sont obligatoires avec VB dans tout code ! $oSM = Objcreate("com.sun.star.ServiceManager") $oDesk = $oSM.createInstance("com.sun.star.frame.Desktop") ;On appelle la fonction setOOoProp définie précédemment pour récupérer la structure $OpenPar[0]= setProp("ReadOnly", True) $OpenPar[1] = setProp("Password", "secret") $OpenPar[2] = setProp("Hidden", False) ;On appelle la fonction OOo loadComponentFromURL, en lui passant en $r_doc = $oDesk.loadComponentFromURL( "private:factory/swriter", "_blank", 0, $OpenPar) Exit Func setProp($cName, $uValue) ; Dim $oPropertyValue ; Dim $oSM $oSM = Objcreate("com.sun.star.ServiceManager") $oPropertyValue = $oSM.Bridge_GetStruct("com.sun.star.beans.PropertyValue") $oPropertyValue.Name = $cName $oPropertyValue.Value = $uValue $setOOoProp= $oPropertyValue Return $setOOoProp EndFunc Link to comment Share on other sites More sharing options...
Francis Lennert (France) Posted December 18, 2005 Share Posted December 18, 2005 Well done. This Sunday seems to be better now. Regards, Francis Link to comment Share on other sites More sharing options...
themax90 Posted December 19, 2005 Share Posted December 19, 2005 @Valik, free editions of those pieces of software are avialible, along with pirate copies from torrent networks, from friends with disks. The chances are that someone they know has it or they can get it for free. So don't freak out. Microsoft has there software well documented and it would be a good way for the user to learn Obj/COM interface so they could productivly work on OOo, please don't slam me for suggestions and ideas Valik. Link to comment Share on other sites More sharing options...
Valik Posted December 19, 2005 Share Posted December 19, 2005 Microsoft doesn't document well, they just document more than most others. There are still large gaps. Microsoft is also prone to odd, unintuitive designs. I wouldn't really consider any Microsoft product a good learner tool unless you want to learn with the hard stuff first. Link to comment Share on other sites More sharing options...
themax90 Posted December 19, 2005 Share Posted December 19, 2005 I was just saying getting used to the Obj/COM interface of AutoIt could be used in examples with excel and word especially since there are so many examples on this forum with excel and other programs etc. Link to comment Share on other sites More sharing options...
Leagnus Posted March 1, 2009 Share Posted March 1, 2009 Many thanks to LOULOU for startin to think and to implement for this fantastic free software.I'm trying to attach to existing com.sun.star.ServiceManager object and unsuccesfully . Why creation of the object is possible and attaching is not?if OpenOffice Calc is runnin $o_Result = ObjGet("", "com.sun.star.ServiceManager") returns 0.May be UNO – Universal Network Objects – aren't com-objects.There is UNO-OLE Bridge, but I'm not so tough to get what is this about. Does someone have an idea? Link to comment Share on other sites More sharing options...
Leagnus Posted March 7, 2009 Share Posted March 7, 2009 ms777 have responded to my attach request. Link to comment Share on other sites More sharing options...
James Posted March 7, 2009 Share Posted March 7, 2009 And the point of the last post is? Blog - Seriously epic web hosting - Twitter - GitHub - Cachet HQ Link to comment Share on other sites More sharing options...
Leagnus Posted March 8, 2009 Share Posted March 8, 2009 Point is that there is vbs-script which easy to convert to au3 for attaching to already opened in memory Open Office calc document. Currently i'm workin on OOoCOM_UDF.au3 library. I have already done _OOoCalc_Open() and _OOoCalc_Attach funcs. Link to comment Share on other sites More sharing options...
PsaltyDS Posted March 9, 2009 Share Posted March 9, 2009 Point is that there is vbs-script which easy to convert to au3 for attaching to already opened in memory Open Office calc document.Currently i'm workin on OOoCOM_UDF.au3 library. I have already done _OOoCalc_Open() and _OOoCalc_Attach funcs.Excellent. Hope to see your UDF in the Example Scipts section when you get your first version ready. Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now