
I am trying to create a simple button that will copy a certain set of text to the clipboard so that it can be pasted later into a note field in the Microsoft Dynamics SL 7.0 application.
I have tried several methods...
Private Sub btnClipboardNote_Click()
'Dim strNote As String
'strNote = "some string data"
'Clipboard.Settext strNote
Dim mytext As String
mytext = "Hello, world."
'My.Computer.Clipboard.Settext mytext
Window.ClipboardData.setData mytext
End Sub
*This post is locked for comments
I have the same question (0)This code works. Need to add a reference to Microsoft Forms Library which can be found in C:\Windows\System32. Need to Hit Browse and select FM20.dll in the System32 directory...
Dim strNote As String
Dim MyClipboard As DataObject
Set MyClipboard = New DataObject
strNote = "some string data"
MyClipboard.SetText strNote
MyClipboard.PutInClipboard