hide windows

User avatar
sal21
PlatinumLounger
Posts: 4334
Joined: 26 Apr 2010, 17:36

hide windows

Post by sal21 »

i use this copde to print a pdf file
...
Dim lngRet As Long
lngRet = ShellExecute(0, "print", PATHPDF, vbNullString, vbNullString, SW_SHOWNORMAL)
...

but i need to dont show the Acrobat window, i need need in a silent mode!

Peraphs i neeed to use SW_HIDE

User avatar
HansV
Administrator
Posts: 78235
Joined: 16 Jan 2010, 00:14
Status: Microsoft MVP
Location: Wageningen, The Netherlands

Re: hide windows

Post by HansV »

Have you tried SW_HIDE?
Best wishes,
Hans

User avatar
sal21
PlatinumLounger
Posts: 4334
Joined: 26 Apr 2010, 17:36

Re: hide windows

Post by sal21 »

HansV wrote:
29 Apr 2023, 17:02
Have you tried SW_HIDE?
No.
I dont know the correct parameter to assign a sw_hide

User avatar
HansV
Administrator
Posts: 78235
Joined: 16 Jan 2010, 00:14
Status: Microsoft MVP
Location: Wageningen, The Netherlands

Re: hide windows

Post by HansV »

SW_HIDE = 0
Best wishes,
Hans

User avatar
sal21
PlatinumLounger
Posts: 4334
Joined: 26 Apr 2010, 17:36

Re: hide windows

Post by sal21 »

HansV wrote:
29 Apr 2023, 21:23
SW_HIDE = 0
I cannot test now, naturally :grin:

User avatar
sal21
PlatinumLounger
Posts: 4334
Joined: 26 Apr 2010, 17:36

Re: hide windows

Post by sal21 »

HansV wrote:
29 Apr 2023, 21:23
SW_HIDE = 0
tested with =0 but Adobe Acrobat windows appear, in other case.!

Have you other method to print a PDF without Acrobat program?

User avatar
HansV
Administrator
Posts: 78235
Joined: 16 Jan 2010, 00:14
Status: Microsoft MVP
Location: Wageningen, The Netherlands

Re: hide windows

Post by HansV »

Sorry, no.
Best wishes,
Hans

User avatar
SpeakEasy
4StarLounger
Posts: 536
Joined: 27 Jun 2021, 10:46

Re: hide windows

Post by SpeakEasy »

>print a PDF without Acrobat program

If the PDF is not too complicated*, you can load it into Word and print from there. You can do all this through automation.

*If the document is complex you might lose some of the fidelity that a PDF is meant to ensure, I.e what you print out may differ in layout from the input