For Programmers: Free Programming Magazines  


Home > Archive > PowerBuilder > March 2004 > Hide word during printout!









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Hide word during printout!
Jeppe Havelund

2004-03-27, 12:22 am

I am controlling MS Word through an OLE-Control in PB8. I want to
printout multiple letters stored in a database. What I dont't like is
that Word is becoming visible a short while for each document:

"LOOP THROUGH DOCUMENTS"
"assign lblob_doc"
inv_oc.objectdata = lblob_doc
inv_oc.ib_close = false
li_rc = inv_oc.Activate(OffSite!)
if li_rc < 0 then
as_err = 'Error'
RETURN ilc_err
end if
inv_oc.Object.Application.Visible = 0
inv_oc.Object.ActiveWindow.View.ShowBookmarks = False
inv_oc.Object.Application.ActiveDocument.PrintOut( 0 )
"END LOOP"

Question : (HOW) Can I avoid that word has to appear for each document?

Regards

Jeppe H, DK


--
Posted via Mailgate.ORG Server - http://www.Mailgate.ORG
jiebe

2004-03-27, 12:22 am

You can use the following code to hide the ole control

ole_word.application.visible = false

I see that you used 0 try using false instead.

jiebe.

"Jeppe Havelund" <jeppe@havelund.dk> wrote in message news:<b5fb11a11c7bf4a34c695e863dc99614.82598@mygate.mailgate.org>...
> I am controlling MS Word through an OLE-Control in PB8. I want to
> printout multiple letters stored in a database. What I dont't like is
> that Word is becoming visible a short while for each document:
>
> "LOOP THROUGH DOCUMENTS"
> "assign lblob_doc"
> inv_oc.objectdata = lblob_doc
> inv_oc.ib_close = false
> li_rc = inv_oc.Activate(OffSite!)
> if li_rc < 0 then
> as_err = 'Error'
> RETURN ilc_err
> end if
> inv_oc.Object.Application.Visible = 0
> inv_oc.Object.ActiveWindow.View.ShowBookmarks = False
> inv_oc.Object.Application.ActiveDocument.PrintOut( 0 )
> "END LOOP"
>
> Question : (HOW) Can I avoid that word has to appear for each document?
>
> Regards
>
> Jeppe H, DK

Jeppe Havelund

2004-03-27, 12:22 am

Well, the visible=0 worked fine, but whenever I use the Activate-command
the application becomes visible again.

I wanted it to be a background job - and now there is a lot of
flickering!

Regards,
Jeppe



--
Posted via Mailgate.ORG Server - http://www.Mailgate.ORG
Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com