Discussion Locked

Misbehaving MS Word Macros

0 helpful
7 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.
Our output from a mainframe application is not formatted for printing on lasers - and we cannot change the code to accomodate our needs. We've created a suite of MS Word macros to take an output text file, format the output appropriately for 8.5 x 11 paper, landscape, setting the font, removing extraneous paragraph marks and force page breaks where they are supposed to go. We've been using these for about 18 months without incident. Until today. Today, after saving the 'corrected' document in Word and reopening it, an extra line feed has been forced at the end of each line totally wrecking the formerly correct output. To further compound the problem, there appears to be no search and replace ability as I can't seem to identify, using Word's offerings, what the special character at each end of line might be. Has anyone ever had a similar experience, or more to the point, solved it for themselves? I've got a monthend to do tonight - over 1500 pages of output I'm going to have totrim by hand. Help.

7 replies

by ann777

Do you have a backup of the macros from an earlier time? I'd suggest that you restore and see if somehow the macros have gotten corrupt.

If you cannot resolve the problem, and considering the time constraints, I would recommend that you write another little macro that removes every other line and run that through your report before printing.

by stillatit

First, double-check that nothing changed in your page setup. An inadvertant change to normal.dot which narrowed your margins could do this.

If, in Word, you click the paragrph mark symbol on the toolbar, you will see graphic representation of all normally invisible characters, so you can see if you are dealing with line wrapping or real paragraph marks.

If you have to use Word's search and replace (control-H or Edit/Replace), look for the button at the lower right of the dialog box, labeled "More" and click it. That gives you some more choices, including a button labeled "Special" which lets you put special characters into the search or replace strings.

For the lazy among us, using the caret (^) (shift-6 on a US keyboard) followed by a letter lets you key these yourself. ^p is a paragraph mark, ^l is a forced line break, ^t is a tab, and so on.

Good luck.

by estebandelatorre

The search and replace ability, should work unless the 1500 pages have hogged the pc memory.
Start searching the problem by
1.- discarding that MS Word is working fine, whit a small document, and with search and recplace.
If not, you will need tore-install MS word (and your macro) in another PC.
2.- If working OK, verify that the main document has not changed!

By the way, I would like to suggest you, a combination of a Lexmark printer + Flash memory + a Software called LEXPRESS, which is intennded to do what you are doing, replace a .txt file from a mainframe (s390 or AS/400) into a professional form, by changing fonts, adding code bars, etc, etc
Without ANY host printer file modification, you can get it printed professionally.

This discussion is closed to new replies.