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

Announcements

No record found.

News and Announcements icon
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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Congratulations to our 2025 Community Spotlights

Thanks to all of our 2025 Community Spotlight stars!

Leaderboard > 🔒一 Microsoft Dynamics SL (Archived)

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans