Skip to Main Content

Oracle Forms

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Print a word document from Forms 6i (Without changing default printer)

509086Jun 10 2008 — edited Jun 10 2008
Hi

I using the function below to print MS Word documents form Forms 6i. It works perfectly but it always changes my printer settings and sets another default printer, which is not what we want.
How can I avoid this, or reset the default printer value which is set before?

Thanks for your Help
Karine

FUNCTION DATEIDRUCKEN (ApplHandle IN OUT OLE2.OBJ_TYPE, p_druckername IN VARCHAR2)
RETURN NUMBER IS
Err Number;
Args OLE2.LIST_TYPE;

BEGIN

args :=OLE2.CREATE_ARGLIST;
OLE2.ADD_ARG (args, TRUE);
args := OLE2.Create_ArgList;
OLE2.Add_Arg(args, p_druckername);
OLE2.Invoke(ApplHandle, 'FilePrintSetup', args);
OLE2.Destroy_ArgList(args);

args := ole2.create_arglist;
ole2.add_arg(args, 0);
-- 0 means no background printing, 1 means background printing
ole2.invoke(ApplHandle, 'FilePrint', args);
ole2.destroy_arglist(args);

RETURN(NULL);

END;
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jul 8 2008
Added on Jun 10 2008
1 comment
800 views