Components All New MacOS Windows Linux iOS
Examples Mac & Win Server Client Guides Statistic FMM Blog Deprecated Old

MBS FileMaker Plugin Example Databases

Replace Text in Word File

All examples are included with download of MBS FileMaker Plugin.

Replace Text in Word File.fmp12

Overview
Tables1
Relationships0
Layouts1
Scripts1
Value Lists0
Custom Functions0
Custom Menus33
File Options
Default custom menu set[Standard FileMaker Menus]
When opening file
Minimum allowed version12.0
Login usingAccount Name; Account= Admin
Allow user to save passwordOff
Require iOS passcodeOff
Switch to layoutOff
Hide all toolbarsOff
Script triggers
OnFirstWindowOpenOff
OnLastWindowCloseOff
OnWindowOpenOff
OnWindowCloseOff
OnFileAVPlayerChangeOff
Thumbnail Settings
Generate ThumbnailsOn; Temporary

 

Tables

Table Name
Statistics
Occurrences in Relationship Graph
Replace Text in Word File
4 fields defined, 6 records
Replace Text in Word File

Fields

Table Name: Replace Text in Word File - 4 Fields
Field NameTypeOptionsCommentsOn LayoutsIn RelationshipsIn ScriptsIn Value Lists
InputContainerNormal, BinaryAuto-Enter:
  • Allow editing
Validation:
  • Only during data entry
Storage:
  • Global
  • Repetitions: 1
      OutputContainerNormal, BinaryAuto-Enter:
      • Allow editing
      Validation:
      • Only during data entry
      Storage:
      • Global
      • Repetitions: 1
          Old TextNormal, TextAuto-Enter:
          • Allow editing
          Validation:
          • Only during data entry
          Storage:
          • Repetitions: 1
          • Indexing: None
          • Automatically create indexes as needed
          • Index Language: German
              New TextNormal, TextAuto-Enter:
              • Allow editing
              Validation:
              • Only during data entry
              Storage:
              • Repetitions: 1
              • Indexing: None
              • Automatically create indexes as needed
              • Index Language: German

                  Layout Objects: Replace Text in Word File

                  Regular Fields

                  Field Name: Replace Text in Word File::InputContainer
                  Field PropertiesCoordinatesField FormatField BehaviorQuick Find
                  • Top: 6 pt
                  • Left: 132 pt
                  • Bottom: 131 pt
                  • Right: 385 pt
                  • Anchoring: Left, Top
                  Field Format:
                  • Edit Box
                  Field Behavior:
                  • Allow field to be entered: In Find mode, In Browse mode
                  • Touch keyboard type: System Default
                  • Go to next field using: Tab key
                  No

                  Field Name: Replace Text in Word File::OutputContainer
                  Field PropertiesCoordinatesField FormatField BehaviorQuick Find
                  • Top: 132 pt
                  • Left: 132 pt
                  • Bottom: 257 pt
                  • Right: 385 pt
                  • Anchoring: Left, Top
                  Field Format:
                  • Edit Box
                  Field Behavior:
                  • Allow field to be entered: In Find mode, In Browse mode
                  • Touch keyboard type: System Default
                  • Go to next field using: Tab key
                  No

                  Field Name: Replace Text in Word File::Old Text
                  Field PropertiesCoordinatesField FormatField BehaviorQuick Find
                  • Top: 270 pt
                  • Left: 138 pt
                  • Bottom: 284 pt
                  • Right: 391 pt
                  • Anchoring: Left, Top
                  Field Format:
                  • Edit Box
                  Field Behavior:
                  • Allow field to be entered: In Find mode, In Browse mode
                  • Touch keyboard type: System Default
                  • Go to next field using: Tab key
                  Yes

                  Field Name: Replace Text in Word File::New Text
                  Field PropertiesCoordinatesField FormatField BehaviorQuick Find
                  • Top: 288 pt
                  • Left: 138 pt
                  • Bottom: 302 pt
                  • Right: 391 pt
                  • Anchoring: Left, Top
                  Field Format:
                  • Edit Box
                  Field Behavior:
                  • Allow field to be entered: In Find mode, In Browse mode
                  • Touch keyboard type: System Default
                  • Go to next field using: Tab key
                  Yes

                  Group Buttons

                  Button PropertiesCoordinatesScript/Script Step
                    Type:
                  • Text: Run
                    Additional Properties:
                  • Change to hand cursor over button
                  • Rectangular
                  • Top: 120 pt
                  • Left: 414 pt
                  • Bottom: 151 pt
                  • Right: 517 pt
                  • Anchoring: Left, Top
                  Perform Script [ “Run” ]

                  Scripts:


                  Script Hierarchy

                  Run

                  Script NameRun
                  Run script with full access privilegesOff
                  Include In MenuYes
                  Layouts that use this script
                  Scripts that use this script
                    Script Definition
                    Script Steps
                    • Set Variable [ $r; Value:MBS("RichText.ReadContainer"; Replace Text in Word File::InputContainer) ]
                    • If [ MBS("IsError") ]
                    • Show Custom Dialog [ Title: "Error"; Message: "Failed to read file."; Default Button: “OK”, Commit: “Yes”; Button 2: “Cancel”, Commit: “No” ]
                    • Exit Script [ ]
                    • End If
                    • Go to Record/Request/Page [ First ]
                    • Loop
                    • Set Variable [ $r; Value:MBS("RichText.ReplaceText"; Replace Text in Word File::Old Text; Replace Text in Word File::New Text) ]
                    • Go to Record/Request/Page [ Next; Exit after last ]
                    • End Loop
                    • Set Field [ Replace Text in Word File::OutputContainer; MBS("RichText.WriteContainer"; "doc"; "test.doc") ]
                    • Set Variable [ $r; Value:MBS("RichText.Release") ]
                    Fields used in this script
                    Scripts used in this script
                      Layouts used in this script
                        Tables used in this script
                        Table occurrences used by this script
                        Custom Functions used by this script
                          Custom menu set used by this script

                            Download example: Replace Text in Word File

                            Used functions: