Results 1 to 3 of 3

Thread: [Resolved]open file with specific program

  1. #1

    Thread Starter
    Fanatic Member dark_shadow's Avatar
    Join Date
    Feb 2005
    Location
    Igloo
    Posts
    900

    [Resolved]open file with specific program

    kind of an out there question but is it possible in vb code to open a file with a specific program not the default program so for example open a inf file with word even tho its not the default file type associated with word
    Last edited by dark_shadow; May 1st, 2008 at 11:51 AM.

  2. #2
    Head Hunted anhn's Avatar
    Join Date
    Aug 2007
    Location
    Australia
    Posts
    3,669

    Re: open file with specific program

    1. For Word only: Create a Word App, use Documents.Open(FileName)

    2. General: Use Shell() if program file support command-line.
    Shell ProgramFileFullPath & " " & DocumentFullPath
    If either path contains a space it must be surrounded by quotes
    • Don't forget to use [CODE]your code here[/CODE] when posting code
    • If your question was answered please use Thread Tools to mark your thread [RESOLVED]
    • Don't forget to RATE helpful posts

    • Baby Steps a guided tour
    • IsDigits() and IsNumber() functions • Wichmann-Hill Random() function • >> and << functions for VB • CopyFileByChunk

  3. #3

    Thread Starter
    Fanatic Member dark_shadow's Avatar
    Join Date
    Feb 2005
    Location
    Igloo
    Posts
    900

    Re: open file with specific program

    alright that seemed to work thanks alot

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width