MSWordStyler
Prepares features for output to the Microsoft Word Writer by providing a convenient interface to set a variety of Microsoft Word format-specific attributes.
Parameters
Content Type
This parameter specifies what kind of Microsoft Word content this feature will add into a document. Based on this parameter the rest of the parameter dialog will change.
Format attribute set: msword_type
Heading Parameters
In Microsoft Word, headings separate a document into collapsible sections. While editing a document in Microsoft Word, if you hover over heading text, an arrow will appear to the left of it allowing you to collapse its section.
This parameter controls what text the heading will show
Format attribute set: msword_heading_text
Headings have different levels. Example: Heading 3 is a subheading of Heading 2, and if you collapse a heading of heading level 2, the entire document under it until the next heading level 2 or heading level 1 will be hidden, even if there are headings of level 3 or greater among the hidden text.
Title is technically not a heading at all, but just some stylized text.
Format attribute set: msword_heading_level
Image Parameters
Image Source has two options: From File and From Feature.
If From File is selected, then the Image Filename parameter is used to select a file.
If From Feature is selected, then the styled feature must have a raster geometry. Its raster geometry is written to the Microsoft Word document.
Format attribute set: msword_image_source
Specifies the path to the desired image.
To browse your file system for an image, click the browse button to the right of the text field.
This parameter is only enabled if Image Source is From File
Format attribute set: msword_image_filename
Sets the image alignment.
Format attribute set: msword_justification
This in conjunction with Image Width specifies how large to scale the image.
If Percentage of Page Width is chosen, then it means the percent of page within the left and right margins. It is possible to extend past the margins given a large enough width.
Format attribute set: msword_measurement_units
This in conjunction with Width Units specifies how large to scale the image.
If Percentage of Page Width was chosen for Width Units, then 100 means the entire page width, while 1 means only one percent.
Format attribute set: msword_image_width
List Item Parameters
The text to be placed.
Format attribute set: msword_bullet_text
How much indent to place left of the list item. In Microsoft Word, this correlates to starting a list, then pressing tab either zero, one, or two times. The positions of each indent level are customizable in Word if you have Ruler enabled through View on Microsoft Word’s ribbon.
If the list is a numbered list, and the indent level changes, then the list item counter will reset to 1.
Format attribute set: msword_bullet_indent
A list can either be Numbered, or Bulleted. A bulleted list always has a black dot to the left of each list item. A numbered list counts 1,2,3,… to the left of each list item.
Format attribute set: msword_bullet_ordered
The font name, size, and styling properties.
To edit this parameter, click the browse button to the right of the text field.
Format attribute set: msword_font_name
Format attribute set: msword_font_size
Format attribute set: msword_font_bold
Format attribute set: msword_font_italic
Format attribute set: msword_font_underline
Format attribute set: msword_font_strikethrough
The color of the text foreground for this list item.
To edit this parameter, click the browse button to the right of the text field.
Format attribute set: msword_font_color
Page Break Parameters
This parameter specifies how many page breaks will be added to the document.
Example: Three page breaks will skip to the next page, then add two empty pages, bringing about either 3 empty pages, or two empty pages and a partially empty page.
Format attribute set: msword_break_count
Paragraph Parameters
Several preset styles exist for the paragraph's typeface, font size, color, etc. Selecting Custom will enable the Font and Font Color parameters.
Format attribute set: msword_paragraph_style
Specifies the pattern used for the border, using the color from Border Color.
Specifies to apply a simplistic markdown to the paragraph for bolding, italicizing, and underlining. If the font is set to bold, then the markdown will instead indicate where text should NOT be bolded. The same applies to italicizing and underlining.
If a section of text is surrounded by doubles asterisks (**text**) then the section will be bolded. If a section of text is surrounded by double tildes (~~text~~) then the section will be italicized. If a section of text is surrounded by double underscores (__text__) then the section will be underlined. If either end of the section has any whitespace, the section will NOT be styled (** bold** has no effect). If a section is empty (****) there will be no effect. These effects can be used in conjunction (**~~bolded and italicized~~**). It’s important that the sections to not intersect each other (**~~a**~~ will not work properly.) The leftmost pattern matches will take precedence. (**left**right**) will bold left but not right. If an asterisk, tilde, or underscore is not part of a valid pattern match, that character will be left in the text to be placed. If any of those characters were part of a valid pattern match, they will not be visible in the text to be placed.
Format attribute set: msword_use_markdown
The text to place, in a separate paragraph.
Format attribute set: msword_paragraph_text
The font name, size, and styling properties.
To edit this parameter, click the browse button to the right of the text field.
Format attribute set: msword_font_name
Format attribute set: msword_font_size
Format attribute set: msword_font_bold
Format attribute set: msword_font_italic
Format attribute set: msword_font_underline
Format attribute set: msword_font_strikethrough
The color of the text foreground for this list item.
To edit this parameter, click the browse button to the right of the text field.
Format attribute set: msword_font_color
Sets the text justification
Format attribute set: msword_justification
Table Parameters
These styles match what is shown in Microsoft Word’s ribbon under the design tab while editing a table. They modify the table’s appearance.
Format attribute set: msword_table_style
Specifies what units will be used when specifying column widths.
If Percentage of Page Width is chosen, then it means the percent of page within the left and right margins. It is possible to extend past the margins given a large enough width.
Format attribute set: msword_measurement_units
The font name, size, and styling properties.
To edit this parameter, click the browse button to the right of the text field.
Format attribute set: msword_font_name
Format attribute set: msword_font_size
Format attribute set: msword_font_bold
Format attribute set: msword_font_italic
Format attribute set: msword_font_underline
Format attribute set: msword_font_strikethrough
The color of the text foreground for this item.
To edit this parameter, click the browse button to the right of the text field.
Format attribute set: msword_font_color
The header text for the particular column.
Format attribute set: msword_table_col_header
The text value to place in a row under the particular column.
Format attribute set: msword_table_col_value
In conjunction with Width Units this sets the particular column’s width.
Any positive number is valid here, or the word Stretch. Columns with the width Stretch will all share any leftover space after columns with specified sizes are given their space.
If Percentage of Page Width was chosen for Width Units, then 100 means the entire page width, while 1 means only one percent.
Format attribute set: msword_table_col_width
Additional References
For more information regarding Microsoft Word styling, see the Microsoft Word Writer chapter in the FME Readers and Writers help. (In Workbench, select Help > FME Readers and Writers.)
Editing Transformer Parameters
Using a set of menu options, transformer parameters can be assigned by referencing other elements in the workspace. More advanced functions, such as an advanced editor and an arithmetic editor, are also available in some transformers. To access a menu of these options, click beside the applicable parameter. For more information, see Transformer Parameter Menu Options.
Defining Values
There are several ways to define a value for use in a Transformer. The simplest is to simply type in a value or string, which can include functions of various types such as attribute references, math and string functions, and workspace parameters. There are a number of tools and shortcuts that can assist in constructing values, generally available from the drop-down context menu adjacent to the value field.
Using the Text Editor
The Text Editor provides a convenient way to construct text strings (including regular expressions) from various data sources, such as attributes, parameters, and constants, where the result is used directly inside a parameter.
Using the Arithmetic Editor
The Arithmetic Editor provides a convenient way to construct math expressions from various data sources, such as attributes, parameters, and feature functions, where the result is used directly inside a parameter.
Conditional Values
Set values depending on one or more test conditions that either pass or fail.
Parameter Condition Definition Dialog
Content
Expressions and strings can include a number of functions, characters, parameters, and more.
When setting values - whether entered directly in a parameter or constructed using one of the editors - strings and expressions containing String, Math, Date/Time or FME Feature Functions will have those functions evaluated. Therefore, the names of these functions (in the form @<function_name>) should not be used as literal string values.
These functions manipulate and format strings. | |
Special Characters |
A set of control characters is available in the Text Editor. |
Math functions are available in both editors. | |
Date/Time Functions | Date and time functions are available in the Text Editor. |
These operators are available in the Arithmetic Editor. | |
These return primarily feature-specific values. | |
FME and workspace-specific parameters may be used. | |
Creating and Modifying User Parameters | Create your own editable parameters. |
Dialog Options - Tables
Transformers with table-style parameters have additional tools for populating and manipulating values.
Row Reordering
|
Enabled once you have clicked on a row item. Choices include:
|
Cut, Copy, and Paste
|
Enabled once you have clicked on a row item. Choices include:
Cut, copy, and paste may be used within a transformer, or between transformers. |
Filter
|
Start typing a string, and the matrix will only display rows matching those characters. Searches all columns. This only affects the display of attributes within the transformer - it does not alter which attributes are output. |
Import
|
Import populates the table with a set of new attributes read from a dataset. Specific application varies between transformers. |
Reset/Refresh
|
Generally resets the table to its initial state, and may provide additional options to remove invalid entries. Behavior varies between transformers. |
Note: Not all tools are available in all transformers.
FME Community
The FME Community is the place for demos, how-tos, articles, FAQs, and more. Get answers to your questions, learn from other users, and suggest, vote, and comment on new features.
Search for samples and information about this transformer on the FME Community.