Hi group,

I'm starting a test to see if I can automate some tasks. In this first test, I'm using System.Diagnostics to open a specific version (I actually have two versions on my computer - both are needed). After that's open, I want to open a specific file within that instance of the application. However I've not figured out how to do this. I've only completed this much so far:

        Dim myFile As New System.Diagnostics.Process

    With myFile
        .StartInfo.WorkingDirectory = "C:\Program Files (x86)\Tableau\Tableau 8.3\bin"
        .StartInfo.FileName = "tableau.exe"
    End With
    myFile.Start()

Now I need to open the following filepath/filename:

O:\Revenue Management\RM -- Specialty Select Brands\Analytics\Tableau Extracts\Pace\SSB_FR_FUTURE_PACE_LOC.twbx

How do I go about doing this?

I did try entering the filepath as ".StartInfo.WorkingDirectory" and the filename as ".StartInfo.FileName". This "worked" except that it opened it file in the most recent version of the Tableau program (which in this instance I cannot do).

I look forward to your thoughts and ideas.

Thanks again!

Don

Recommended Answers

All 2 Replies

StartInfo class has Arguments property where you can pass parameters. In your case it is the name of the file you want to open.

Add following line after line 5
.StartInfo.Arguments = "O:\Revenue Management\RM -- Specialty Select Brands\Analytics\Tableau Extracts\Pace\SSB_FR_FUTURE_PACE_LOC.twbx"

Now "O:\Revenue Management\RM -- Specialty Select Brands\Analytics\Tableau Extracts\Pace\SSB_FR_FUTURE_PACE_LOC.twbx" is passed as an argument to "tableau.exe" application.

HTH

Awesome! Thank you, Teme64!

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.