Link to home
Start Free TrialLog in
Avatar of suzygm71478
suzygm71478

asked on

Use SendKeys Custom Code via Hyperlink Action

I want to use a SendKeys function to call a Windows application and open a record.

Is there a way to add this custom code to a Reporting Services report and use it through the Hyperlink action?  The desired effect is to let our users click on the link and have the windows application open to the account directly.

Thanks,

Susan
Sub Main()
        Dim ProcID As Integer
        ' Start the Calculator application, and store the process id.
        ProcID = Shell("""D:\Program Files\Diamond\UI\Diamond.exe""", AppWinStyle.NormalFocus)
        ' Activate the Calculator application.
        AppActivate(ProcID)
        ' Send the keystrokes to the Calculator application.
        My.Computer.Keyboard.SendKeys("{F3}", True)
        My.Computer.Keyboard.SendKeys("1006010860", True)
        My.Computer.Keyboard.SendKeys("{Enter}", True)
        ' My.Computer.Keyboard.SendKeys("=", True)
 
    End Sub

Open in new window

ASKER CERTIFIED SOLUTION
Avatar of jgv
jgv

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of suzygm71478
suzygm71478

ASKER

So maybe put this function in a subreport and use the hyplerlink to pass the parameter to it?  Thanks for the info, this is great help.
Spectacular info.  Thanks so much.