-----Messaggio Originale----- Da: "Mindaugas Kavaliauskas" <dbto...@dbtopas.lt>
A: "Harbour Project Main Developer List." <harbour@harbour-project.org>
Data invio: mercoledì 16 settembre 2009 1.14
Oggetto: Re: [Harbour] Another OLE problem


But I know that, if :StoryRanges is a real OLE collection, when :StoryRanges:Item(5) should work for sure in both xHarbour and Harbour, because :Item() is OLE method defined for all collections.

Sorry, I missed "Item". This is the sample now

FUNCTION MAIN()

   LOCAL oWord

   oWord = WIN_OLECREATEOBJECT( "Word.Application" )

   oWord:Documents:Add()

   ? oWord:ActiveDocument:StoryRanges:Item( 5 )

   oWord:Visible = .T.

   RETURN NIL

and this is the error

Error BASE/3012  Argument error: ITEM
Called from WIN_OLEAUTO:ITEM(0)
Called from MAIN(9)

Still works using xHarbour.

EMG

--
EMAG Software Homepage:     http://www.emagsoftware.it
The EMG's ZX-Spectrum Page: http://www.emagsoftware.it/spectrum
The Best of Spectrum Games: http://www.emagsoftware.it/tbosg
The EMG Music page: http://www.emagsoftware.it/emgmusic
_______________________________________________
Harbour mailing list
Harbour@harbour-project.org
http://lists.harbour-project.org/mailman/listinfo/harbour

Reply via email to