Am Sonntag, den 19.06.2005, 18:19 +0200 schrieb Paolo Mantovani: > Hi Ennio > > Alle 00:15, giovedì 16 giugno 2005, Ennio-Sr ha scritto: > [...] > > Concerning the second part of the captioned subject, > > I started reading the Star Basic Guide and tried to run one of the > > examples I found there; but I'm under the impression to have picked the > > wrong one for a start, as there is no way to make it run! > > > > This example was taken from p. 102 of the Italian version: > > > > Sub test_search > > '------------------------ > > > > Dim SearchDesc As Object > > Dim Doc as Object > > > > Doc = StarDesktop.CurrentComponent '[*] > [....] > > [*] BASIC runtime error: Property or method not found. > > When you're in the IDE the CurrentComponent is the IDE itself ! > therefore you must run the macro from a Writer document
To solve this problem immediately: use "thisComponent" instead of "currentComponent" and you avoid getting the IDE but only "real document" components. HTH, Marc --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
