Re: ShellExecute fails when printing a document.
From: Gon Nadiya (WazHot_at_mymail.com)
Date: 11/02/04
- Next message: rajani: "Re: space in folder name generates error"
- Previous message: FMara: "More combo box challenges"
- In reply to: Rolf Lystad: "Re: ShellExecute fails when printing a document."
- Next in thread: Rolf Lystad: "Re: ShellExecute fails when printing a document."
- Reply: Rolf Lystad: "Re: ShellExecute fails when printing a document."
- Messages sorted by: [ date ] [ thread ]
Date: Tue, 2 Nov 2004 09:37:25 +0600
Rolf,
Thanks for the information.
As I learnt to overcome this in my registry I need to add a new shell for
'Print'.
For this I want to find the command which is to be given.
Does anyone know what should be the command I should give to print an eml
file?
I can't prompt the user to print the document as this is happeneng in an
automated system where there's no user intervention.
Hence it is impossible to ask the user to print.
Will the code you got help me to find the command to print?
If so please send me it.
Thanks.
Nadee.
"Rolf Lystad" <rolf@invalid.invalid> wrote in message
news:uyO94BGwEHA.2624@TK2MSFTNGP11.phx.gbl...
> >
> > ShellExecute(lnHandle,"PRINT",lcFile,"","",1)
> >
> > The error message is "31,There is no association for the specified file
> > type
> > or there is no association for the specified action within the file
type"
> > But when seected to open it opens in Microsoft Outlook without a
problem.
> >
> > When I right click on an eml file in the menu the print option is not
> > shown.
> > Is this is cause for this error?
>
> Yes, it is
>
> > Is there a way I can overcome this issue?
>
> I suggest you check the registry before using ShellExecute.
> Both to see if there is a value for ...\shell\open\ddeexec or
> ...\shell\open\command and to check if there is a value for
> ...\shell\print\ddeexec or ..\shell\print\command.
> If the file cannot be printed with ShellExecute, you can inform the user
> that the file will be opened instead of printed, and that the user has to
do
> the printing himself.
>
> If you need further assistance, I can post code for handling this.
>
>
>
- Next message: rajani: "Re: space in folder name generates error"
- Previous message: FMara: "More combo box challenges"
- In reply to: Rolf Lystad: "Re: ShellExecute fails when printing a document."
- Next in thread: Rolf Lystad: "Re: ShellExecute fails when printing a document."
- Reply: Rolf Lystad: "Re: ShellExecute fails when printing a document."
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|