>>>>Hi All,
>>>>
>>>>There is a XML file formatted invoice. I can open it from IE and Firefox and print manually. How can I open and print it from command line parameter or winapi function?
>>>>
>>>>Actually this's not a VFP job, it's an Axapta job... :)
>>>>
>>>>I can open it with :
>>>>
>>>>winAPI::shellExecute("iexplore.EXE"," "+FileNameSaveXml);
>>>>
>>>>How can I just print and go without open browser window or is there any simple way to print?
>>>
>>>ShellExecute has a parameter for Print, default is Open. It also has a parameter to not show the program you start.
>>
>>Do you know, how?
>
>Is this for VFP? If so, this is the wrapper I use, you can adapt it to match your own need.
>
>
>*ShellX.prg:
>*To use:
>*
>*lcProg = 'Yourpath\yourprog.exe'
>*lcPar = 'some parameters'
>*ShellX(lcProg, lcPar)
>Lparameters tcURL, tcParameter
>if empty(tcParameter)
> tcParameter = ''
>Endif
>#define SW_HIDE 0
>#DEFINE SW_SHOWNORMAL 1
>#DEFINE SW_SHOWMINIMIZED 2
>#DEFINE SW_SHOWMAXIMIZED 3
>*!* Legal verbs: open, edit, print, find, explore, NULL
>DECLARE INTEGER ShellExecute IN shell32.dll ;
> INTEGER hndWin, STRING cAction, STRING cFileName, ;
> STRING cParams, STRING cDir, INTEGER nShowWin
>ShellExecute( 0, "open", tcURL, tcParameter , "", SW_SHOWNORMAL )
>
>You can find all the various parameter easily on Google, try "shellexecute syntax".
Thank you,
I thought it's about me but seem open and edit commads work well but print command doesn't with xml files.