#1
|
|||
|
|||
mapping from token to text/number pair
I would like to set up a mapping from a token to a pair so that occurrences of the token in the document can be replaced (either dynamically or by post-processing) by a label (which is a text string) and a value (which is another text string). I am using the word "token" with some caution, hopefully avoiding words that already have special meaning in the Word context.
An example triple: token=bk, label="book", value="12x". The tokens are unique. There may be thousands of such mappings, so ideally the triples of token/text/number would be defined in an Excel spreadsheet. The spreadsheet would have 3 columns, one each for token, label, and value. In the document, all I want to show is the token. For example, an XML-style token (which would be perfectly fine if I knew how to do the rest) might be <bk/>. I want to be able to modify the spreadsheet, by adding and deleting tokens, and by modifying their labels or values. These updates should then be reflected in the document. I have done this before in both XML/XSLT and TeX contexts, but not with Word. Maybe this could be done with a VB macro? Unfortunately I don't know VB at all. Any input is appreciated! |
Tags |
macro, mapping, token |
Thread Tools | |
Display Modes | |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
how to have two formats in the Caption style: Label – number - text? | Jamal NUMAN | Word | 39 | 03-14-2017 06:32 PM |
Mapping in Word - Point to Point Directions | unistate | Word | 0 | 08-08-2011 10:04 AM |
Footnote text is not aligned with the corresponding number | Patrick1988 | Word | 0 | 08-28-2010 09:33 PM |
Convert Number to Text | devcon | Word | 0 | 07-10-2010 01:16 AM |
text not visible in a number of emails | jbrad | Outlook | 0 | 07-06-2010 03:44 PM |