Newbies Nev Posted November 14, 2006 Newbies Posted November 14, 2006 How do you force a field to retain it's formatting? Example copy from word or a web page and paste into FM Pro V7,8 & Advanced and it retains the font from the source. The Synchronise with field font option DOES NOT WORK!! Considering Filemaker Pro is all about data in and out there must be a solution without having to write a script for this. Any ideas?
John Mark Osborne Posted November 14, 2006 Posted November 14, 2006 I don't see the duplicate post by Nev. You can either use the Option (Mac) or Shift (Windows) when pasting to paste without style or you can create a script with the Paste step with the option to paste without style.
Newbies Nev Posted November 14, 2006 Author Newbies Posted November 14, 2006 Thanks, sorted, would like ot see the field to retains its formatting without having to do this. My search of the forums prior to my post only found one similar instance which was not answered. All the best. Nev
Lee Smith Posted November 14, 2006 Posted November 14, 2006 (edited) Hi Nev, and welcome to the Forum. When you go through the Clipboard (i.e copy and paste), you are limited to either the manual Key combination, or or the script step, or the Auto Enter Calcualtion since you are showing v7 as your version. To use an Auto Enter calculation, you will have to combine the text styles you want. As an example, lets suppose that you what the font Arial, size 14, and Black Color: [color:blue]TextColor (TextSize ( TextFont ( YourTextFieldHere ; "Arial" ); 14) ; RGB ( 0 ; 0 ; 0 ) ), or if you upgrade to v8, you could just have it remove text styles. To set up up on the field you are wanting to paste into, select Your Text Field in Define Fields, choose [color:blue]Options, select the [color:red]Specify Calculate value, insert [color:blue]TextColor (TextSize ( TextFont ( YourTextFieldHere ; "Arial" ); 14) ; RGB ( 0 ; 0 ; 0 ) ) , (change the Field to your Text Field, modify the Font and Size to match your field specification, click [color:red]Okay, [color:red]Deselect the [color:blue]Option [color:red]Do not replace existing value in the field (if any) HTH Lee Edited November 14, 2006 by Guest clean up
John Mark Osborne Posted November 14, 2006 Posted November 14, 2006 If you are using FileMaker 8 or higher, you can use the TextFormatRemove function in the auto-enter calculation described by Lee. If you still have FileMaker 7, you can use the Evaluate and Quote function together to remove all formatting: Evaluate(Quote(myfield))
Lee Smith Posted November 14, 2006 Posted November 14, 2006 :giggle: Or you can do it the easy way and follow John's Advice. I never used v7, and was surprised that the [color:blue]TextFormatRemove ( text ) Function was [color:red]not there. Instead of reverting to the v6 way of doing this, I thought I would get creative with the Functions that were there. Thanks for jumping in John, Lee
Ender Posted November 14, 2006 Posted November 14, 2006 If you are using FileMaker 8 or higher, you can use the TextFormatRemove function in the auto-enter calculation described by Lee. If you still have FileMaker 7, you can use the Evaluate and Quote function together to remove all formatting: Evaluate(Quote(myfield)) Sounds familiar.
John Mark Osborne Posted November 15, 2006 Posted November 15, 2006 Sounds familiar. Yes, it does sound familiar. http://www.filemakerpros.com/NOSTYLE.zip
Lee Smith Posted November 15, 2006 Posted November 15, 2006 Hi John, I should have figured you would have a demo file for this. Oh well, I had fun playing around with it anyway. Lee :cool:
Recommended Posts
This topic is 6644 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