OpenOffice.org Forum at OOoForum.orgThe OpenOffice.org Forum
 
 [Home]   [FAQ]   [Search]   [Memberlist]   [Usergroups]   [Register
 [Profile]   [Log in to check your private messages]   [Log in

Automate compare documents in Visual Basic:help please!

 
Post new topic   Reply to topic    OOoForum.org Forum Index -> OpenOffice.org Macros and API
View previous topic :: View next topic  
Author Message
Patrick9
General User
General User


Joined: 30 Mar 2005
Posts: 8

PostPosted: Fri Apr 01, 2005 1:04 am    Post subject: Automate compare documents in Visual Basic:help please! Reply with quote

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.
Back to top
View user's profile Send private message
Cybb20
Super User
Super User


Joined: 02 Mar 2004
Posts: 1569
Location: Frankfurt, Germany

PostPosted: Mon Apr 11, 2005 8:02 am    Post subject: Reply with quote

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 -
Back to top
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic   Reply to topic    OOoForum.org Forum Index -> OpenOffice.org Macros and API All times are GMT - 8 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group