Merge Data To The Clipboard

From Dwayne Wright PMP, PMI-ACP, CSM
Certified FileMaker Developer

WEB: www.dwaynewright.com
EMAIL: info@dwaynewright.com
TWITTER: dwaynewright
YOUTUBE: FileMakerThoughts

A READER ASKS
---------------
We are using merge field in FM 8.5 on Mac. We can print or pdf these merges but can't get them to the clipboard to paste the merged text into emails (where we personalize them). Any clues?

DWAYNE RESPONDS
---------------
I actually had never thought of that but I guess that is true. You cannot copy text that is on a layout in browse mode. I don’t know of any workarounds for this other than creating a calculation field counterpart to the merge text. That might be enough of a work around for you.

Although SELF is a FileMaker 9 feature, I’m not sure that would help. I tried setting up a tooltip to display merge text using the SELF function and that did work. However, you cannot use the SELF function in a calculation. It seems regulated to use within tooltips and conditional formatting.

Here you can see a merge text on a layout and the tooltip that shows the contents of the merge text.

If anyone has any ideas on this, please let me know and I will pass it on.

---------------
GOT A SOLUTION FROM ANOTHER READER
---------------
Koen Van Hulle of SHpartners sent me an email with the perfect answer!

“The solution to your question is simple.
The only thing you have to do is give your text object a name.
Then you can use the function GetLayoutObjectAttribute ( "myMergeField" ; "content" ) to grab the content.”

Thanks Koen!

(by the way, checkout FMButlers product line of FileMaker add on products at http://www.myfmbutler.com/ and their FileMaker tip blog at http://blog.myfmbutler.com)

DWAYNE RESPONDS
Tried this out and it does work like a charm. You do need to make sure the calculation is unstored, just in case the merge field data changes. You did just get in under the wire because the GetLayoutObjectAttribute was introduced with version 8.5.
=
More info about the author and FileMaker in general, contact me at info@dwaynewright.com.

© 2008 - Dwayne Wright - dwaynewright.com

The material on this document is offered AS IS. There is NO REPRESENTATION OR WARRANTY, expressed or implied, nor does any other contributor to this document. WARRANTIES OF MERCHANT ABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE EXPRESSLY DISCLAIMED. Consequential and incidental damages are expressly excluded. FileMaker Pro is the registered trademark of FileMaker Inc.