Patrick9 General User

Joined: 30 Mar 2005 Posts: 8
|
Posted: Fri Apr 01, 2005 1:04 am Post subject: Automate compare documents in Visual Basic:help please! |
|
|
hi ,
I want to automate compare in Visual Basic, i see the post of chis but i have the same problem.I want to do the same like him.
I have this code:
'Creating service manager
Set objServiceManager = CreateObject("com.sun.star.ServiceManager")
'Creating a public object to use reflection for structured properties
Set objCoreReflection = objServiceManager.createinstance("com.sun.star.reflection.CoreReflection")
'Creating a Desktop to open files
Set Desktop = objServiceManager.createinstance("com.sun.star.frame.Desktop")
'Create the Dispatcher
Set Dispatcher = objServiceManager.createinstance("com.sun.star.frame.DispatchHelper")
'Open the file
Set Document1 = Desktop.loadComponentFromURL("file:///c:/a.doc", "_blank", 0, arg())
'Set the frame
Set Frame = Desktop.getCurrentFrame
'Set the arguments
Set CompParams(0) = OOoPropertyValue("InteractionHandler", False)
Set CompParams(1) = OOoPropertyValue("FileName", "file:///c:/b.doc")
Set CompParams(2) = OOoPropertyValue("CompareDocuments", True)
'Execute the comparison
Dispatcher.executeDispatch Frame, ".uno:CompareDocuments", "", 0, CompParams
////////////////
I want to compare automate this two documents but it open the window to select the second document to compare.
Some body can help me please???
And if somebody know how compare 2 documents with sbasic code without use the compare of openoffice,please send me please,because i need this two things because i want to open the comparator of openofice if previuslly i find some differences. |
|
Cybb20 Super User


Joined: 02 Mar 2004 Posts: 1569 Location: Frankfurt, Germany
|
Posted: Mon Apr 11, 2005 8:02 am Post subject: |
|
|
Unfortunately there is no main resource to know the parameters of dispatch calls, the only possibility is to get insider help on API mailinglist or to dig the source code (if you don't understand C++ it doesn't make much sense!).
The hardest thing with the source code is to find the right portions, but lxr will help you a lot:
http://ooo.ximian.com/
Christian _________________ - Knowledge is Power - |
|