PC Review Forums Newsgroups Microsoft Outlook Microsoft Outlook VBA Programming Printing MSG file failed. Why?

Reply

Printing MSG file failed. Why?

 
Thread Tools Rate Thread
Old 11-08-2004, 04:15 AM   #1
nycboy
Guest
 
Posts: n/a
Default Printing MSG file failed. Why?


Hi,

I tried to print saved MSG files from file folder
to printing device with following two methods, but
both were failed (nothing happening).

Way 1: From shell

"C:\Program Files\Microsoft Office\Office\OUTLOOK.EXE" /p
"C:\file1.msg"

Way 2: From VB code

...
Dim Scr As Short
...
Scr = GetDesktopWindow()
rtn = ShellExecute(Scr, "Print", _
"c:\file1.msg", "", _
"c:\", SW_SHOWNORMAL)

But similar commands seem working fine for other
office file types.

Can anyone help me to find out the reason? Thanks!


David



*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
  Reply With Quote
Old 11-08-2004, 12:44 PM   #2
Sue Mosher [MVP-Outlook]
Guest
 
Posts: n/a
Default Re: Printing MSG file failed. Why?

Check the File Types in Windows Explorer -- Tools | FOlder Options. What
application is set up for printing .msg files?

--
Sue Mosher, Outlook MVP
Author of
Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers
http://www.outlookcode.com/jumpstart.aspx


<nycboy> wrote in message news:edLX4F1fEHA.1972@TK2MSFTNGP09.phx.gbl...
> Hi,
>
> I tried to print saved MSG files from file folder
> to printing device with following two methods, but
> both were failed (nothing happening).
>
> Way 1: From shell
>
> "C:\Program Files\Microsoft Office\Office\OUTLOOK.EXE" /p
> "C:\file1.msg"
>
> Way 2: From VB code
>
> ...
> Dim Scr As Short
> ...
> Scr = GetDesktopWindow()
> rtn = ShellExecute(Scr, "Print", _
> "c:\file1.msg", "", _
> "c:\", SW_SHOWNORMAL)
>
> But similar commands seem working fine for other
> office file types.
>
> Can anyone help me to find out the reason? Thanks!
>
>
> David
>
>
>
> *** Sent via Developersdex http://www.developersdex.com ***
> Don't just participate in USENET...get rewarded for it!



  Reply With Quote
Old 11-08-2004, 03:26 PM   #3
nycboy
Guest
 
Posts: n/a
Default Re: Printing MSG file failed. Why?

Hi Sue,

Thanks for your reply.

File type MSG listed as Outlook Item and is specified
opening with Microsoft Outlook. In actions window,
both Open (default) and Print actions are defined.
In action editing window, checkbox "Use DDE"
is checked, however "DDE Message" and "DDE Application Not Running" are
blank.

David

---- Original Message ----

Re: Printing MSG file failed. Why?
From: Sue Mosher [MVP-Outlook]
Date Posted: 8/11/2004 5:47:00 AM



Check the File Types in Windows Explorer -- Tools | FOlder Options. What
application is set up for printing .msg files?

--
Sue Mosher, Outlook MVP
Author of
Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers
http://www.outlookcode.com/jumpstart.aspx


<nycboy> wrote in message news:edLX4F1fEHA.1972@TK2MSFTNGP09.phx.gbl...
> Hi,
>
> I tried to print saved MSG files from file folder
> to printing device with following two methods, but
> both were failed (nothing happening).
>
> Way 1: From shell
>
> "C:\Program Files\Microsoft Office\Office\OUTLOOK.EXE" /p
> "C:\file1.msg"
>
> Way 2: From VB code
>
> ...
> Dim Scr As Short
> ...
> Scr = GetDesktopWindow()
> rtn = ShellExecute(Scr, "Print", _
> "c:\file1.msg", "", _
> "c:\", SW_SHOWNORMAL)
>
> But similar commands seem working fine for other
> office file types.
>
> Can anyone help me to find out the reason? Thanks!
>
>
> David
>



*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
  Reply With Quote
Old 11-08-2004, 04:37 PM   #4
Sue Mosher [MVP-Outlook]
Guest
 
Posts: n/a
Default Re: Printing MSG file failed. Why?

Can you successfully drag an .msg file to a printer icon?

--
Sue Mosher, Outlook MVP
Author of
Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers
http://www.outlookcode.com/jumpstart.aspx


<nycboy> wrote in message news:ukf%23486fEHA.3932@TK2MSFTNGP09.phx.gbl...
> Hi Sue,
>
> Thanks for your reply.
>
> File type MSG listed as Outlook Item and is specified
> opening with Microsoft Outlook. In actions window,
> both Open (default) and Print actions are defined.
> In action editing window, checkbox "Use DDE"
> is checked, however "DDE Message" and "DDE Application Not Running" are
> blank.
>
> David
>
> ---- Original Message ----
>
> Re: Printing MSG file failed. Why?
> From: Sue Mosher [MVP-Outlook]
> Date Posted: 8/11/2004 5:47:00 AM
>
>
>
> Check the File Types in Windows Explorer -- Tools | FOlder Options. What
> application is set up for printing .msg files?


>
> <nycboy> wrote in message news:edLX4F1fEHA.1972@TK2MSFTNGP09.phx.gbl...
> > Hi,
> >
> > I tried to print saved MSG files from file folder
> > to printing device with following two methods, but
> > both were failed (nothing happening).
> >
> > Way 1: From shell
> >
> > "C:\Program Files\Microsoft Office\Office\OUTLOOK.EXE" /p
> > "C:\file1.msg"
> >
> > Way 2: From VB code
> >
> > ...
> > Dim Scr As Short
> > ...
> > Scr = GetDesktopWindow()
> > rtn = ShellExecute(Scr, "Print", _
> > "c:\file1.msg", "", _
> > "c:\", SW_SHOWNORMAL)
> >
> > But similar commands seem working fine for other
> > office file types.
> >
> > Can anyone help me to find out the reason? Thanks!
> >
> >
> > David
> >

>
>
> *** Sent via Developersdex http://www.developersdex.com ***
> Don't just participate in USENET...get rewarded for it!



  Reply With Quote
Old 11-08-2004, 07:36 PM   #5
nycboy
Guest
 
Posts: n/a
Default Re: Printing MSG file failed. Why?

Yes, I can. But again, it went into silence.
Nothing coming out from printer (and it seems
not adding into printing queue).

David

--- Original Message ----

Re: Printing MSG file failed. Why?


Can you successfully drag an .msg file to a printer icon?

--
Sue Mosher, Outlook MVP
Author of
Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers
http://www.outlookcode.com/jumpstart.aspx


<nycboy> wrote in message
news:ukf%23486fEHA.3932@TK2MSFTNGP09.phx.gbl...
> Hi Sue,
>
> Thanks for your reply.
>
> File type MSG listed as Outlook Item and is specified
> opening with Microsoft Outlook. In actions window,
> both Open (default) and Print actions are defined.
> In action editing window, checkbox "Use DDE"
> is checked, however "DDE Message" and "DDE Application Not Running"

are
> blank.
>
> David
>
> ---- Original Message ----
>
> Re: Printing MSG file failed. Why?
> From: Sue Mosher [MVP-Outlook]
> Date Posted: 8/11/2004 5:47:00 AM
>
>
>
> Check the File Types in Windows Explorer -- Tools | FOlder Options.

What
> application is set up for printing .msg files?


>
> <nycboy> wrote in message

news:edLX4F1fEHA.1972@TK2MSFTNGP09.phx.gbl...
> > Hi,
> >
> > I tried to print saved MSG files from file folder
> > to printing device with following two methods, but
> > both were failed (nothing happening).
> >
> > Way 1: From shell
> >
> > "C:\Program Files\Microsoft Office\Office\OUTLOOK.EXE" /p
> > "C:\file1.msg"
> >
> > Way 2: From VB code
> >
> > ...
> > Dim Scr As Short
> > ...
> > Scr = GetDesktopWindow()
> > rtn = ShellExecute(Scr, "Print", _
> > "c:\file1.msg", "", _
> > "c:\", SW_SHOWNORMAL)
> >
> > But similar commands seem working fine for other
> > office file types.
> >
> > Can anyone help me to find out the reason? Thanks!
> >
> >
> > David





*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
  Reply With Quote
Old 11-08-2004, 07:58 PM   #6
Sue Mosher [MVP-Outlook]
Guest
 
Posts: n/a
Default Re: Printing MSG file failed. Why?

Sounds like there's a problem with the print action on your machine. On mine
with Outlook 2003 Sp1, it works fine. The settings are:

Application: "C:\Program Files\Microsoft Office\OFFICE11\OUTLOOK.EXE" /p
"%1"
Use DDE: enabled
DDE Application: OUTLOOK
DDE Topic: System

Other boxes are blank.

You might try using Help | Detect and Repair.

--
Sue Mosher, Outlook MVP
Author of
Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers
http://www.outlookcode.com/jumpstart.aspx


<nycboy> wrote in message news:%23hYiaI9fEHA.1764@TK2MSFTNGP10.phx.gbl...
> Yes, I can. But again, it went into silence.
> Nothing coming out from printer (and it seems
> not adding into printing queue).
>
> David
>
> --- Original Message ----
>
> Re: Printing MSG file failed. Why?
>
>
> Can you successfully drag an .msg file to a printer icon?
>
>
> <nycboy> wrote in message
> news:ukf%23486fEHA.3932@TK2MSFTNGP09.phx.gbl...
> > Hi Sue,
> >
> > Thanks for your reply.
> >
> > File type MSG listed as Outlook Item and is specified
> > opening with Microsoft Outlook. In actions window,
> > both Open (default) and Print actions are defined.
> > In action editing window, checkbox "Use DDE"
> > is checked, however "DDE Message" and "DDE Application Not Running"

> are
> > blank.
> >
> > David
> >
> > ---- Original Message ----
> >
> > Re: Printing MSG file failed. Why?
> > From: Sue Mosher [MVP-Outlook]
> > Date Posted: 8/11/2004 5:47:00 AM
> >
> >
> >
> > Check the File Types in Windows Explorer -- Tools | FOlder Options.

> What
> > application is set up for printing .msg files?

>
> >
> > <nycboy> wrote in message

> news:edLX4F1fEHA.1972@TK2MSFTNGP09.phx.gbl...
> > > Hi,
> > >
> > > I tried to print saved MSG files from file folder
> > > to printing device with following two methods, but
> > > both were failed (nothing happening).
> > >
> > > Way 1: From shell
> > >
> > > "C:\Program Files\Microsoft Office\Office\OUTLOOK.EXE" /p
> > > "C:\file1.msg"
> > >
> > > Way 2: From VB code
> > >
> > > ...
> > > Dim Scr As Short
> > > ...
> > > Scr = GetDesktopWindow()
> > > rtn = ShellExecute(Scr, "Print", _
> > > "c:\file1.msg", "", _
> > > "c:\", SW_SHOWNORMAL)
> > >
> > > But similar commands seem working fine for other
> > > office file types.
> > >
> > > Can anyone help me to find out the reason? Thanks!
> > >
> > >
> > > David

>
>
>
>
> *** Sent via Developersdex http://www.developersdex.com ***
> Don't just participate in USENET...get rewarded for it!



  Reply With Quote
Old 12-08-2004, 04:46 PM   #7
nycboy
Guest
 
Posts: n/a
Default Re: Printing MSG file failed. Why?

Thanks, Sue.

I am using Outlook 2000. By the way, I installed
the same version of Outlook on a brand new machine
and it has the same problem. But I don't want
to upgrade it to introduce the annoying security
popups.

Is there a way programmatically print the MSG files
besides this /p option?

David

---- Original Message ----

Re: Printing MSG file failed. Why?


Sounds like there's a problem with the print action on your machine. On
mine
with Outlook 2003 Sp1, it works fine. The settings are:

Application: "C:\Program Files\Microsoft Office\OFFICE11\OUTLOOK.EXE" /p
"%1"
Use DDE: enabled
DDE Application: OUTLOOK
DDE Topic: System

Other boxes are blank.

You might try using Help | Detect and Repair.

--
Sue Mosher, Outlook MVP
Author of
Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers
http://www.outlookcode.com/jumpstart.aspx


<nycboy> wrote in message
news:%23hYiaI9fEHA.1764@TK2MSFTNGP10.phx.gbl...
> Yes, I can. But again, it went into silence.
> Nothing coming out from printer (and it seems
> not adding into printing queue).
>
> David
>
> --- Original Message ----
>
> Re: Printing MSG file failed. Why?
>
>
> Can you successfully drag an .msg file to a printer icon?
>
>
> <nycboy> wrote in message
> news:ukf%23486fEHA.3932@TK2MSFTNGP09.phx.gbl...
> > Hi Sue,
> >
> > Thanks for your reply.
> >
> > File type MSG listed as Outlook Item and is specified
> > opening with Microsoft Outlook. In actions window,
> > both Open (default) and Print actions are defined.
> > In action editing window, checkbox "Use DDE"
> > is checked, however "DDE Message" and "DDE Application Not Running"

> are
> > blank.
> >
> > David
> >
> > ---- Original Message ----
> >
> > Re: Printing MSG file failed. Why?
> > From: Sue Mosher [MVP-Outlook]
> > Date Posted: 8/11/2004 5:47:00 AM
> >
> >
> >
> > Check the File Types in Windows Explorer -- Tools | FOlder Options.

> What
> > application is set up for printing .msg files?

>
> >
> > <nycboy> wrote in message

> news:edLX4F1fEHA.1972@TK2MSFTNGP09.phx.gbl...
> > > Hi,
> > >
> > > I tried to print saved MSG files from file folder
> > > to printing device with following two methods, but
> > > both were failed (nothing happening).
> > >
> > > Way 1: From shell
> > >
> > > "C:\Program Files\Microsoft Office\Office\OUTLOOK.EXE" /p
> > > "C:\file1.msg"
> > >
> > > Way 2: From VB code
> > >
> > > ...
> > > Dim Scr As Short
> > > ...
> > > Scr = GetDesktopWindow()
> > > rtn = ShellExecute(Scr, "Print", _
> > > "c:\file1.msg", "", _
> > > "c:\", SW_SHOWNORMAL)
> > >
> > > But similar commands seem working fine for other
> > > office file types.
> > >
> > > Can anyone help me to find out the reason? Thanks!
> > >
> > >
> > > David



*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
  Reply With Quote
Old 12-08-2004, 05:13 PM   #8
Sue Mosher [MVP-Outlook]
Guest
 
Posts: n/a
Default Re: Printing MSG file failed. Why?

Another option would be to use the third-party Redemption library to import
the .msg file into the appropriate type of Outlook item, then use the
Outlook item's PrintOut method.

--
Sue Mosher, Outlook MVP
Author of
Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers
http://www.outlookcode.com/jumpstart.aspx


<nycboy> wrote in message news:enQbAOIgEHA.904@TK2MSFTNGP09.phx.gbl...
> Thanks, Sue.
>
> I am using Outlook 2000. By the way, I installed
> the same version of Outlook on a brand new machine
> and it has the same problem. But I don't want
> to upgrade it to introduce the annoying security
> popups.
>
> Is there a way programmatically print the MSG files
> besides this /p option?
>
> David
>
> ---- Original Message ----
>
> Re: Printing MSG file failed. Why?
>
>
> Sounds like there's a problem with the print action on your machine. On
> mine
> with Outlook 2003 Sp1, it works fine. The settings are:
>
> Application: "C:\Program Files\Microsoft Office\OFFICE11\OUTLOOK.EXE" /p
> "%1"
> Use DDE: enabled
> DDE Application: OUTLOOK
> DDE Topic: System
>
> Other boxes are blank.
>
> You might try using Help | Detect and Repair.
>
> <nycboy> wrote in message
> news:%23hYiaI9fEHA.1764@TK2MSFTNGP10.phx.gbl...
> > Yes, I can. But again, it went into silence.
> > Nothing coming out from printer (and it seems
> > not adding into printing queue).
> >
> > David
> >
> > --- Original Message ----
> >
> > Re: Printing MSG file failed. Why?
> >
> >
> > Can you successfully drag an .msg file to a printer icon?
> >
> >
> > <nycboy> wrote in message
> > news:ukf%23486fEHA.3932@TK2MSFTNGP09.phx.gbl...
> > > Hi Sue,
> > >
> > > Thanks for your reply.
> > >
> > > File type MSG listed as Outlook Item and is specified
> > > opening with Microsoft Outlook. In actions window,
> > > both Open (default) and Print actions are defined.
> > > In action editing window, checkbox "Use DDE"
> > > is checked, however "DDE Message" and "DDE Application Not Running"

> > are
> > > blank.
> > >
> > > David
> > >
> > > ---- Original Message ----
> > >
> > > Re: Printing MSG file failed. Why?
> > > From: Sue Mosher [MVP-Outlook]
> > > Date Posted: 8/11/2004 5:47:00 AM
> > >
> > >
> > >
> > > Check the File Types in Windows Explorer -- Tools | FOlder Options.

> > What
> > > application is set up for printing .msg files?

> >
> > >
> > > <nycboy> wrote in message

> > news:edLX4F1fEHA.1972@TK2MSFTNGP09.phx.gbl...
> > > > Hi,
> > > >
> > > > I tried to print saved MSG files from file folder
> > > > to printing device with following two methods, but
> > > > both were failed (nothing happening).
> > > >
> > > > Way 1: From shell
> > > >
> > > > "C:\Program Files\Microsoft Office\Office\OUTLOOK.EXE" /p
> > > > "C:\file1.msg"
> > > >
> > > > Way 2: From VB code
> > > >
> > > > ...
> > > > Dim Scr As Short
> > > > ...
> > > > Scr = GetDesktopWindow()
> > > > rtn = ShellExecute(Scr, "Print", _
> > > > "c:\file1.msg", "", _
> > > > "c:\", SW_SHOWNORMAL)
> > > >
> > > > But similar commands seem working fine for other
> > > > office file types.
> > > >
> > > > Can anyone help me to find out the reason? Thanks!
> > > >
> > > >
> > > > David

>
>
> *** Sent via Developersdex http://www.developersdex.com ***
> Don't just participate in USENET...get rewarded for it!



  Reply With Quote
Reply



Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off