How can i link to an other program?

B

Bertil Haga

I want to create a link that opens RDP. I have created a document over my
network and now I want crate links in this document to different computers
and later convert it to a webpage. Any suggestions?

I’m using Visio Professional 2003
 
A

Al Edlund

assuming you have a custom property with an ipaddress, you might consider a
macro like this
al

Public sub TermServeToTarget(byval visShape as visio.shape)

Dim visCell As Visio.Cell
Dim wsh ' create a variable for the script shell
Dim strCommand as string

' build the command preface
strCommand = ""c:\windows\system32\mstsc.exe /v:"
' check for custom property, if there get ip address if not get out
if visShape.CellExists("prop.IpAddress",False) then
Set visCell = visShape.Cells("prop.IpAddress")
strCommand = strCommand & visCell.Value
strCommand = strCommand & " /console"
else

Msgbox"counldn't find custom property"
exit sub
end if

' create the script shell environment
Set wsh = CreateObject("wscript.shell")

' now execute the command that we built
wsh.Run (strCommand)

End Sub
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top