open and print files with vba?

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • deko

    open and print files with vba?

    Is there a way to open and/or print a saved file (.doc, .pdf, .xls, etc)
    using VBA?

    something like...

    Call Shell(strInvoic ePath, OpenFile)

    or

    Call Shell(strInvoic ePath, PrintFile)

    ?

    Thanks in advance.

  • Tom van Stiphout

    #2
    Re: open and print files with vba?

    On Wed, 25 Jan 2006 19:52:02 -0800, "deko" <deko@nospam.co m> wrote:

    Yes. Use the ShellExecute API.


    -Tom.

    [color=blue]
    >Is there a way to open and/or print a saved file (.doc, .pdf, .xls, etc)
    >using VBA?
    >
    >something like...
    >
    > Call Shell(strInvoic ePath, OpenFile)
    >
    >or
    >
    > Call Shell(strInvoic ePath, PrintFile)
    >
    >?
    >
    >Thanks in advance.[/color]

    Comment

    • deko

      #3
      Re: open and print files with vba?

      > Yes. Use the ShellExecute API.[color=blue]
      > http://www.mvps.org/access/api/api0018.htm[/color]

      That does the trick. I was thinking there was some vba function, but that
      api function is fine.

      Thanks for the tip.

      Comment

      Working...