Results 1 to 3 of 3
  1. #1
    New Lounger
    Join Date
    May 2003
    Posts
    20
    Thanks
    0
    Thanked 0 Times in 0 Posts

    MS Word Makro (2K +)

    1. How is it possible to run in the top-most window an application started by "shell" statement ?
    2. How is it possible to run application with parameter, e.g. pathapplication.exe file_name.ext?

    Thanks for help.

    Andrzej

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: MS Word Makro (2K +)

    You can use an instruction like this:
    <code>
    Shell """C:Program FilesMicrosoft OfficeOfficeExcel.exe"" ""C:ExcelTest.xls""", vbNormalFocus
    </code>
    Note the use of double double quotes around the path+filename of the application and around the path+filename of the file to be opened. When you want to place quotes around some text within a quoted string, you must double the quotes.
    The second argument vbNormalFocus specifies that the application will receive the focus (become the topmost window). You can also use vbMaximizedFocus.

  3. #3
    New Lounger
    Join Date
    May 2003
    Posts
    20
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: MS Word Makro (2K +)

    Thank you, Hans - it works perfectly.

    Rgds - Andrzej

Posting Permissions

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