Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

Populating for copy/paste

RobertsGeekChic
Level 2
Level 2

Hi all,

I have a subform that is populated by a range of different areas of the form.  It's working perfectly but I need to be able to take the information and put it into something that can be easily copy and pasted into, lets say, Excel. 

I have tried Javascript's execDialog box which looks great but it doesn't allow the selection of text.  Same thing with the xfa.host.messageBox. 

I have tried a few of Javascript's window.open methods as well and that hasn't worked either.  I thought I might be able to open another window that displays the string. 

I even thought I could recreate it in a table and populate each field so it has great formatting but I can't figure out how to populate a text area (NOT a text field - that's easy but you still can't copy it!).

Please help!  This is the very last step of my project and I am at my deadline!

1 Reply
yodadobe
Level 6
Level 6

In the Calculate event of a text field, Language: JavaScipt

this.rawValue={Press Ctrl then click on first field you want the value from, release control}.rawValue+{repeat Ctrl click for each field}

You can also put html table tags into the text to get it to paste into rows and columns in Excel. http://w3schools.com/html/html_tables.asp