Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Easy Question - How to open an App's document

Status
Not open for further replies.

Milin

Technical User
Jan 5, 2000
33
0
0
US
Visit site
Hello, <br>
I know this is easy, but I am new at this.....<br>
I am trying to create a button that will open directly to a document of a registered app on my machine (in this case, Crystal Reports) What's below doesn't work. <br>
<br>
In other words, I want to open the Crystal Reports report and not the exe<br>
<br>
THanks<br>
<br>
Private Sub Command0_Click()<br>
On Error GoTo Err_Command0_Click<br>
<br>
Dim stAppName As String<br>
<br>
stAppName = &quot;C:\crw2\crw32.exe_M:\Database\Fulfillment House\State Media Codes.rpt&quot;<br>
Call Shell(stAppName, 1)<br>
<br>
Exit_Command0_Click:<br>
Exit Sub<br>
<br>
Err_Command0_Click:<br>
MsgBox Err.Description<br>
Resume Exit_Command0_Click<br>
End Sub<br>
<br>
<br>

 
You're very close. Just change the underscore character between the exe and the file name to a space:<br>
<br>
&quot;C:\crw2\crw32.exe M:\Database\Fulfillment House\State Media Codes.rpt&quot; <p>nick bulka<br><a href=mailto:nick@bulka.com>nick@bulka.com</a><br><a href= > </a><br>
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top