Re: Problems with a shell command (print) in VBA

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance

From: Yonah Sudwerts (yonahs_at_gmail.com)
Date: 12/06/04

  • Next message: Dmitry Streblechenko \(MVP\): "Re: Generic Item Type ??"
    Date: Mon, 6 Dec 2004 23:03:50 +0200
    
    

    I did that, I created a print command on the other computer, making it look
    exactly like the one that is on my computer (where the script works).

    "Ken Slovak - [MVP - Outlook]" <kenslovak@mvps.org> wrote in message
    news:O2PMIB92EHA.3316@tk2msftngp13.phx.gbl...
    > ShellExecute would rely on the "print" verb having been defined on that
    > computer for that file type. If no verb has been defined then the print
    > will
    > fail. You will need to define that verb on that computer, using the
    > application that is available. Use the path to Document Imaging.
    >
    > --
    > Ken Slovak
    > [MVP - Outlook]
    > http://www.slovaktech.com
    > Author: Absolute Beginner's Guide to Microsoft Office Outlook 2003
    > Reminder Manager, Extended Reminders, Attachment Options
    > http://www.slovaktech.com/products.htm
    >
    >
    > "Yonah Sudwerts" <yonahs@gmail.com> wrote in message
    > news:41b4adb6$1@news.012.net.il...
    >> I apoligize if this is the wrong place to ask this, but since I started
    >> my
    >> project with you guys, I'll hopefully finish it here.
    >>
    >> Here is the situation, My script has this defined:
    >>
    >> >>Private Declare Function ShellExecute Lib "shell32.dll" _
    >> >> Alias "ShellExecuteA" (ByVal hwnd As Long, ByVal lpOperation As
    > String,
    >> >> _
    >> >> ByVal lpFile As String, ByVal lpParameters As String, _
    >> >> ByVal lpDirectory As String, ByVal nShowCmd As Long) As Long
    >>
    >> And the Calling Line is:
    >>
    >> >>lRetVal = ShellExecute(0&, "print", strFile, 0&, 0&, 0&)
    >>
    >> OK, I should note the file I am trying to print (which was an attachment)
    > is
    >> a .TIF file. On my computer when I checked the File Type properties, I
    >> had
    >> both the "open" and "print" command, and the script works perfectly, just
    > to
    >> note the command line in the properties of the file is: "C:\Program
    >> Files\Common Files\Microsoft Shared\MODI\11.0\MSPVIEW.EXE" /p "%1"
    >> The problem is that when I used the script on the computer that it needs
    > to
    >> run on, the following problem comes up: (I will ignire the
    >> mailitem.sendername problem that I got around with Redemption :)
    >> First off the Print command was not set up on the properties for TIF
    > files,
    >> so I simply copied exactly what my computer (which works) said (obviously
    >> using the correct path to the file.
    >> The computer when it hits the print line in the script opens the TIF file
    > in
    >> Microsoft Image and Fax Viewer, whic is not even the program that is
    >> supposed to open it, and stops, no peint no nothing.
    >> Just to add, If I Double-Click on the same TIF file it opens in Microsoft
    >> Office Document Imaging.
    >>
    >> I am running Office 2003 on Windows XP Pro. He is running Office XP
    >> (2002)
    >> on Windows XP Home.
    >> I can not think of any other info that would matter to you.
    >> If anyone can try and help me,(which isn't easy, since I have to think of
    >> different possibilities and then only test them when I have access to his
    >> computer) or if not, please try and direct to a NG that might be able to
    >> help.
    >>
    >> TIA,
    >> Yoni
    >>
    >>
    >>
    >
    >


  • Next message: Dmitry Streblechenko \(MVP\): "Re: Generic Item Type ??"

    Relevant Pages

    • Re: Problems with a shell command (print) in VBA
      ... I did that, I created a print command on the other computer, making it look ... exactly like the one that is on my computer (where the script works). ... >> The computer when it hits the print line in the script opens the TIF file ... >> I am running Office 2003 on Windows XP Pro. ...
      (microsoft.public.outlook.program_vba)
    • Problems with a shell command (print) in VBA
      ... My script has this defined: ... a .TIF file. ... If I Double-Click on the same TIF file it opens in Microsoft ... I am running Office 2003 on Windows XP Pro. ...
      (microsoft.public.office.developer.outlook.vba)
    • Problems with a shell command (print) in VBA
      ... My script has this defined: ... a .TIF file. ... If I Double-Click on the same TIF file it opens in Microsoft ... I am running Office 2003 on Windows XP Pro. ...
      (microsoft.public.outlook.program_vba)
    • Re: Perl print command from browser
      ... >are images viewed within a web browser (firefox), ... >specify the exact command that prints. ... >change firefox's print command to execute the script? ...
      (perl.beginners)
    • Re: Cannot print in OE
      ... An erro has occurred in the script on this page ... Error: Unspecified error ... Ron ... > (When you use the Print command or the Print Preview command, ...
      (microsoft.public.windows.inetexplorer.ie6_outlookexpress)