Wickerman Posted May 8, 2012 Posted May 8, 2012 I have a client who occasionally needs to copy and paste addresses from an FMP field and into a Word document. He is asking if I can set the field so that the text can be copied "without text formatting". Apparently in his previous FM solution (which were .fp5) when they pasted in text, it automatically adopted the target document's font/size etc. He writes: "Yes, the pop-up displays in 13 pt. Arial. And that is what you get when you paste it no matter what the target formatting is. For example, I want to paste an address in a Thank You letter template that uses 12 pt. Times New Roman. With our old database, it would the copy-and-paste address would just automatically take the target formatting. Now it it automatically pastes with the source formatting. Microsoft Word does offer the option after something is pasted to keep the source formatting or match the destination formatting. But this is an extra step that some of us are not used to performing." I tried wrapping the field in a TextFormatRemove ( text ) calculation, but that hasn't solved it. I have kind of a shaky sense of how FM handles formatting. Is there a way in FM11 to deliver the behavior he desires? thanks!
comment Posted May 12, 2012 Posted May 12, 2012 Well, to begin with, the data in the field should have no styling of itself; it should be plain text. Otherwise the data-level styles will override the layout-level settings. If that is the case, then the text copied from the field will also be plain text and will not carry any memory of the formats applied to the field's instance on the layout.
Vaughan Posted May 12, 2012 Posted May 12, 2012 Your clients needs to learn how to *paste* without formatting, rather than trying to change the text afterwards. If they are on a Mac use the "Paste and Match Style" command. If on a PC there is usually a "Paste Special" command that has a plain text option.
Wickerman Posted May 18, 2012 Author Posted May 18, 2012 Thanks for the replies -- so, Comment, if the field in question is a Calc field (it concatenates the various pieces of info in to an address) and in the Calculation I wrap the entire thing in: TextFormatRemove ( text ) . . . then that's about all I can do from my end, right? Or do I need to go to each of the little fields (name, address line 1, state, etc . . .) and set *them* up as calc fields that display TextFormatRemove ( Self ) . . . or . . . .? Thanks Vaughn, too -- that was sort of my impression, but they had said this wasn't an issue in their earlier Filemaker -- maybe by chance the Filemaker field was formatted the same way as the desired target text.
Wickerman Posted June 22, 2012 Author Posted June 22, 2012 Could anyone confirm whether setting up a Field with an auto-enter calc: TextFormatRemove ( Field ) will reliably strip the inserted data of formatting?
LaRetta Posted June 23, 2012 Posted June 23, 2012 Yes, if you uncheck in the auto-enter (do not replace existing value of field if any). Then any time field data is changed, TextFormatRemove() will strip the formatting on it. :^)
Recommended Posts
This topic is 4536 days old. Please don't post here. Open a new topic instead.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now