class Clipboard (.Net Framework 3.5) - setting Html data
Posted: Mon Mar 18, 2013 7:30 am
I need to export in Html format which can be loaded into application Word (I am using Dyalog 13.1 version)
For this reason I would set Clipboard using dotnet class Clipboard according to Microsoft instructions:
http://msdn.microsoft.com/en-us/library/system.windows.forms.clipboard.setdata(v=vs.90).aspx
I wrote a function like this:
z←clip x;⎕USING
⍝ x: Html text
⎕USING←'System'
⎕USING,←⊂'System.Windows.Forms,system.windows.forms.dll'
Clipboard.SetData('Html' x)
1
The Html text x is taken from Windows site
http://msdn.microsoft.com/en-us/library/aa767917%28VS.85%29.aspx
and is could be exactly this (below) but when I paste into Word nothing happenes.
Could anyone help me to undestand why I can not setting Clipboard ?
Thanks in advance
Roberto
___________________________________________________________________
Version:0.9
StartHTML:71
EndHTML:170
StartFragment:140
EndFragment:160
StartSelection:140
EndSelection:160
<!DOCTYPE>
<HTML>
<HEAD>
<TITLE>The HTML Clipboard</TITLE>
<BASE HREF="http://sample/specs">
</HEAD>
<BODY>
<!--StartFragment -->
<P>The Fragment</P>
<!--EndFragment -->
</BODY>
</HTML>
For this reason I would set Clipboard using dotnet class Clipboard according to Microsoft instructions:
http://msdn.microsoft.com/en-us/library/system.windows.forms.clipboard.setdata(v=vs.90).aspx
I wrote a function like this:
z←clip x;⎕USING
⍝ x: Html text
⎕USING←'System'
⎕USING,←⊂'System.Windows.Forms,system.windows.forms.dll'
Clipboard.SetData('Html' x)
1
The Html text x is taken from Windows site
http://msdn.microsoft.com/en-us/library/aa767917%28VS.85%29.aspx
and is could be exactly this (below) but when I paste into Word nothing happenes.
Could anyone help me to undestand why I can not setting Clipboard ?
Thanks in advance
Roberto
___________________________________________________________________
Version:0.9
StartHTML:71
EndHTML:170
StartFragment:140
EndFragment:160
StartSelection:140
EndSelection:160
<!DOCTYPE>
<HTML>
<HEAD>
<TITLE>The HTML Clipboard</TITLE>
<BASE HREF="http://sample/specs">
</HEAD>
<BODY>
<!--StartFragment -->
<P>The Fragment</P>
<!--EndFragment -->
</BODY>
</HTML>