web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics SL (Archived)

Create Simple Button to Copy Text to Clipboard NOT using JavaScript

(0) ShareShare
ReportReport
Posted on by 110

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)
  • Verified answer
    techuser Profile Picture
    110 on at

    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

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics SL (Archived)

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans