Copy Text to the Clipboard

Big_D
Member Posts: 213
Hi mibuso.com
In NAV 2009 R2 I used the Automation routine 'CSIDEClipboard'.Text to copy Text out of NAV to the Clipboard. This works great but now want to do the same thing in NAV 2018 - how is this possible please?
In NAV 2009 R2 I used the Automation routine 'CSIDEClipboard'.Text to copy Text out of NAV to the Clipboard. This works great but now want to do the same thing in NAV 2018 - how is this possible please?
Big D signing off!
0
Best Answers
-
Yes it is, you can use the DotNet variable: System.Windows.Forms.Clipboard.'System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'
Clipboard.SetText(ValueToClipholder);For help, do not use PM, use forum instead, perhaps other people have the same question, or better answers.5 -
With a dotNet Variable.
Clipboard DotNet System.Windows.Forms.Clipboard.'System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'
Clipboard.SetText('Text to Clipboard');1 -
Hi Big_D
Set the RunOnClient property of the dotnet variable as Yes.
0 -
Wahey SigGunn
That works a treat - you're a star!
See you can even read the Clipboard too!
CopyAddrTest() Clipboard.Clear; Clipboard.SetText ('Testing Clipboard for NAV2018 Upgrade'); //Copy text to Clipboard IF Clipboard.ContainsText then //Does Clipboard have text - even reads clipboard generally! MESSAGE ('(%1)', Clipboard.GetText); //Display Clipboard
Keep up the good work!Big D signing off!0
Answers
-
Yes it is, you can use the DotNet variable: System.Windows.Forms.Clipboard.'System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'
Clipboard.SetText(ValueToClipholder);For help, do not use PM, use forum instead, perhaps other people have the same question, or better answers.5 -
With a dotNet Variable.
Clipboard DotNet System.Windows.Forms.Clipboard.'System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'
Clipboard.SetText('Text to Clipboard');1 -
Does anybody know how to do the same in the webclient?0
-
Hi SanderDk and sb_ for the solution
!
All the code was there but getting this error message ...
Not done any dotnet stuff to date in NAV - other than call Clipboard.SetText('Text to Clipboard'); - do I need to do anything else?Big D signing off!0 -
Hi Big_D
Set the RunOnClient property of the dotnet variable as Yes.
0 -
Wahey SigGunn
That works a treat - you're a star!
See you can even read the Clipboard too!
CopyAddrTest() Clipboard.Clear; Clipboard.SetText ('Testing Clipboard for NAV2018 Upgrade'); //Copy text to Clipboard IF Clipboard.ContainsText then //Does Clipboard have text - even reads clipboard generally! MESSAGE ('(%1)', Clipboard.GetText); //Display Clipboard
Keep up the good work!Big D signing off!0
Categories
- All Categories
- 73 General
- 73 Announcements
- 66.6K Microsoft Dynamics NAV
- 18.7K NAV Three Tier
- 38.4K NAV/Navision Classic Client
- 3.6K Navision Attain
- 2.4K Navision Financials
- 116 Navision DOS
- 851 Navision e-Commerce
- 1K NAV Tips & Tricks
- 772 NAV Dutch speaking only
- 617 NAV Courses, Exams & Certification
- 2K Microsoft Dynamics-Other
- 1.5K Dynamics AX
- 320 Dynamics CRM
- 111 Dynamics GP
- 10 Dynamics SL
- 1.5K Other
- 990 SQL General
- 383 SQL Performance
- 34 SQL Tips & Tricks
- 35 Design Patterns (General & Best Practices)
- 1 Architectural Patterns
- 10 Design Patterns
- 5 Implementation Patterns
- 53 3rd Party Products, Services & Events
- 1.6K General
- 1.1K General Chat
- 1.6K Website
- 83 Testing
- 1.2K Download section
- 23 How Tos section
- 252 Feedback
- 12 NAV TechDays 2013 Sessions
- 13 NAV TechDays 2012 Sessions