[[https://www.revelation.com/|Sign up on the Revelation Software website to have access to the most current content, and to be able to ask questions and get answers from the Revelation community]] ==== SHELL32 and ShowWindow() problem (OpenInsight 32-bit Specific) ==== === At 25 NOV 2003 05:58:20AM Pete Smith wrote: === {{tag>"OpenInsight 32-bit Specific"}} I am trying to get ShellExecuteA to print a word document without having Word show up on the screen. I want Word to appear minimised, hence the code: declare function ShellExecuteA hWnd=0 lpOperation=print':\00\ lpFileName =docPath:'\':docFileName:\00\ lpParams =\00\ lpDir =\00\ iShow =2 retVal=ShellExecuteA(hWnd,lpOperation,lpFileName,lpParams,lpDir,iShow) However, Word always displays irrespective of what I set iShow to. I have prototyped DLL_SHELL32 as: SHELL32 handle STDCALL ShellExecuteA( handle, lpchar, lpchar, lpchar, lpchar, int) Any ideas? Thanks. ---- === At 25 NOV 2003 08:32AM [url=http://www.sprezzatura.com]The Sprezzatura Group[/url] wrote: === Pete, It's possible that MS have programmed Word to ignore the iShowCmd argument. This is usually passed to a program via it's WinMain entry point and it's upto the application to act accordingly when it gets it. [url=http://www.sprezzatura.com]The Sprezzatura Group[/url] [i]World leaders in all things RevSoft[/i] [img]http://www.sprezzatura.com/zz.gif[/img] ---- === At 27 NOV 2003 04:32AM Colin Rule wrote: === You could also just use Utility RUNWIN, and execute the document. If you pass the the following as options, it will start Word minimised, print and close. /mAppminimize /mFilePrintDefault /mFileExit Basically, every menu option in Word has an associated macro name, which can be called with /m Colin ---- === At 27 NOV 2003 07:03PM Barry Stevens wrote: === Got any /m commands for Acrobat Reader? ---- === At 27 NOV 2003 10:27PM Steve Smith wrote: === Barry, try shell the command - c:\Acrobat 6.0\Reader\AcroRd32.exe /t "c:\path\myfile.pdf" "HP LaserJet 6MP" "winspool" "LPT1:" Include the quotes. Steve ---- === At 28 NOV 2003 03:28AM Barry Stevens wrote: === Thx Steve [[https://www.revelation.com/revweb/oecgi4p.php/O4W_HANDOFF?DESTN=O4W_RUN_FORM&INQID=NONWORKS_READ&SUMMARY=1&KEY=F12AB728F809912085256DE9003C45C9|View this thread on the forum...]]