Am Mo, den 11.04.2005 schrieb Darragh Sherwin um 23:28:
> Hi Albert,
> 
> Please use the mailing list in future, you will get a quicker and better 
> response.
> 
> Unfortunately, it has been a while since I looked at this code,
> I don't think it will work.
> The problem is that each paragraph contains so much formatting 
> attributes, etc that would have to compare all these attributes.
> 
> The only thing you could do, is a string compare on the text of the 
> paragraphs, see below.
> 
> 
> Albert Palma Xicola wrote:
> > hi ,
> > I want to automate compare documents in SBasic.
> > I have this code i see it in one of your mail,but i donʼt work good:
> 
> I am not familiar with StarBasic, Andrew Pitoyak's Macro Document is a 
> good starting point
> 
> > 
> > 
> > Set objServiceManager = CreateObject("com.sun.star.ServiceManager")
> > 
> > Set Desktop = objServiceManager.CreateInstance("com.sun.star.frame.Desktop")
> > 
> > 
> > Set Doc1 = Desktop.loadComponentFromURL("file:///c:/a.sxc", "_blank", 0, 
> > arg())
> > 
> > Set Doc2 = Desktop.loadComponentFromURL("file:///c:/b.sxc", "_blank", 0, 
> > arg())
> > 
> >  
> > 
> > Set paragraphs_doc1 = Doc1.Text.createEnumeration()  ʽhere it give me a 
> > error: 'RUNTIME ERROR 438: OBJECT DOES NOT SUPPORT THIS PROPERTY OR METHOD  

That should work, are you sure the document is really loaded? I'm not
used to WIndows URLs but that one above looks wrong. Try this for
safety:

Set Doc1 =
Desktop.loadComponentFromURL(ConvertToURL("file:///c:/a.sxc"), "_blank",
0, arg())

HTH,
Marc



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to