© Matti Mattila, CPFA, CISA, CIA

TexEdiMac: Appending lower Line(s) to upper One

Previous item Next item Previous menu
Test Design
Picture 1
Picture 2
Picture 5
Picture 6
- In picture 1 a file (source file) is shown that will be used in demonstrating 'Append lower line to Upper one' functionality ('RemCarRet') of 'TexEdiMac' (later renamed as 'TexEdi') macro.
- Our objective is to append lines containing numbers to lines containing alphabets, i.e. to add the second line and the third line, in this order, after the first line; to add fifth line and sixth line after the fourth line; and so on. There are 15 lines in the test file.
Running the macro
- The easiest way to run the macro is pressing simultaneously Ctrl + Shift + 't'.
- At the beginning of the run the macro shows the user the form in picture 2. Select 'Append lower Line to Upper one', and click 'Proceed'.
- The macro informs what it does (picture 2a: [1]). Read the message, and click 'Yes' in order to proceed.
Picture 3
Picture 4
- The macro asks to select a source file (picture 3).
- We browse and find 'test.txt' in folder 'RemCarRet' (picture 4). We select that file.
- The macro suggests a name to the new file: the body of the name of the source file, with a bit different extension ('tx9 in stead on 'txt' in the example). On the form (picture 5), where the file name was suggested, you can change the extension of the [resulting] new file, if you do not want it to be 'tx9'. You do not need to write anything in the box 'File extension is stead of 'tx9'' when you decide to use extension 'tx9' [2].
- The macro will inform, what will be the path and name of the resulting file (not shown in pictures; it would be: 'D:/AppLowToUpp/test.tx9').
- The macro gives a message telling the count of lines and the shortest and the longest line of the source file (picture 6). The message is delivered in a dialog, where to decide, how many lower lines of source file shall be appended to upper line. We write '2'.
The new text file
- The new file resulting from the run is shown in picture 7.
We can see that lines were appended just as we wanted.
Picture 7

[1] Text (in picture to the left) on 'Guidance' worksheet of 'TexEdiMac.xls': what the macro does.
Picture 2a
[2] The macro does not use special characters in an extension.