SHELL32 and ShowWindow() problem (OpenInsight 32-bit Specific)
At 25 NOV 2003 05:58:20AM Pete Smith wrote:
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=0lpOperation=print':\00\lpFileName =docPath:'\':docFileName:\00\lpParams =\00\lpDir =\00\iShow =2retVal=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.
World leaders in all things RevSoft
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