Re: Usage of OLE2 in Forms 4.5 for Microsoft Word 97

From: <psalmu_at_my-dejanews.com>
Date: Fri, 25 Sep 1998 15:50:00 GMT
Message-ID: <6uge38$6k2$1_at_nnrp1.dejanews.com>


In article <360b97af.27887159_at_145.4.3.97>,   anitas_at_trisoft.be wrote:
> QUESTION: how can I delete a bookmark?
> The command in VB is: ActiveDocument.Bookmarks("TEST").Delete

bookmarks := OLE2.GET_OBJ_PROPERTY(MyActiveDocument, 'Bookmarks'); gives you the handle to bookmark list object and then:

my_arglist := OLE2.CREATE_ARGLIST;

OLE2.ADD_ARG(my_arglist, 'TEST');
OLE2.INVOKE(OLE2.INVOKE_OBJ(bookmarks, 'Item', my_arglist), 'Delete');
OLE2.DESTROY_ARGLIST(my_arglist);

Actually I haven't tried exactly this but I have managed to select a bookmark the same way.

> EXAMPLE: When I want to save the document I use:
> PROCEDURE saveAs(MyApplication in OLE2.obj_type, file_name in
> varchar2) IS
> MyActiveDocument OLE2.obj_type;
> my_arglist OLE2.list_type;
> BEGIN
> MyActiveDocument := OLE2.get_obj_property(MyApplication,
> 'ActiveDocument');
> my_arglist := OLE2.create_arglist;
> OLE2.add_arg(my_arglist, file_name);
> OLE2.invoke(MyActiveDocument, 'SaveAs', my_arglist);
> OLE2.destroy_arglist(my_arglist);
> OLE2.release_obj(MyActiveDocument);
> END;
>
> The command in VB is: ActiveDocument.SaveAs FileName:="Doc2.doc" ...
>
> Tips can be sent to anitas_at_trisoft.be

-----== Posted via Deja News, The Leader in Internet Discussion ==----- http://www.dejanews.com/rg_mkgrp.xp Create Your Own Free Member Forum Received on Fri Sep 25 1998 - 17:50:00 CEST

Original text of this message