About the Author

author photo

I'm currently administering and providing content for our new Wiki at http://www.insightsfour51.com/wiki

See All Posts by This Author

Document Actions Series: Text Manipulation

As I sit here watching out my windows and seeing snow fall, in early November, I can’t but think of the “The Ice Bowl”. This obviously lead me to think the NFL’s trademark rights and how that might need to be controlled in their marketing and branding world. I’ll use that as an example today. The basic premise is that the ™ symbol should be inserted after the letters “NFL” are printed on the page.

I’ll use a combination of 2 different document actions (ReplaceText, Superscript). The project requires only one variable: Text. Text must be set as Formatted Text kind.

First, I’ll create the ReplaceText action. This action does precisely what the name suggests. It takes a character set to find, and when found replaces that text with another set of characters. In this case I’m looking for “NFL” so that I can replace it with NFL™. Here is the document action definition:

Method: ReplaceText
Arguments:
SpecName (contstant) = Text
OldCharacter (Constant) = NFL
NewCharacters (constant) = NFL™

Secondly, I’ll demonstrate the use of the Superscript action. While it’s not necessary in this example I wanted to show how it can be used, even in conjunction with another document action. Here is the document action definition:

Method: Superscript
Arguments:
SpecName (constant) = Text
Character (constant) = ™

Pretty simple example, but one that I think translates into real world project needs. I suggest you follow this up by reading on the GetPositionIndex action as well as Suffix and Prefix. They are closely related to the actions discussed in this post.

This document action chaining example can be views and downloaded at the demo site. The product is named “Documents Actions Calculations”.

VN:F [1.9.0_1079]
Rating: 0.0/10 (0 votes cast)
VN:F [1.9.0_1079]
Rating: 0 (from 0 votes)
Google Buzz

Popularity: 86%

  • Share/Bookmark
 

There Is 1 Response So Far. »

  1. I wanted to use the replace text document action to change the “st” in 1st to be superscript. I would use the superscript document action but in this particular case if someone would enter First, then it would change the “st” to superscript which I do not want. Only if they enter a number then I want the two letters following the number to be superscrpit.

    So, I thought I would try the replace text. I tried to copy and paste the new copy that I want but the superscript did not hold.
    Do you have any suggestions and/or can I do something with a advanced scripting to accomplish this?

    UN:F [1.9.0_1079]
    Rating: 0.0/5 (0 votes cast)
    UN:F [1.9.0_1079]
    Rating: 0 (from 0 votes)

Post a Response

CommentLuv Enabled