macro fix

D

Doug Robbins - Word MVP

The code I was referring to was second piece of code that I posted and was
contained in my post of 6/14. Not the first piece of code which you
included with your post of 6/14.

It assumes that you have a document with a table containing the codes and
their replacements

CC Conflict and Courage
CCh Counsels for the Church
CD Counsels on Diet and Foods
CE Christian Education
CET Christian Experience and Teaching
CEv Colporteur Evangelist
CG Child Guidance
CH Counsels on Health
ChL Christian Leadership
ChS Christian Service
CL Country Living
CM Colporteur Ministry
COL Christ's Object Lessons
Con Confrontation
COS Christ Our Saviour
CS Counsels on Stewardship
CSW Counsels on Sabbath School Work
CT Counsels to Parents, Teachers, and Students

and that you have saved and closed that document. Then, with the document
on which you want the operation to be performed, you run the macro. It will
cause the File>Open dialog box to be displayed and at that point you must
navigate to and open the document containing the table with the codes and
their replacements. After you do that, the macro (when I run it here) goes
to work on the document on which you want the replacements performed and
replaces each instance of the code with its corresponding decription/full
name.

Is that the way in which you tried to use it?


--
Please post any further questions or followup to the newsgroups for the
benefit of others who may be interested. Unsolicited questions forwarded
directly to me will only be answered on a paid consulting basis.

Hope this helps
Doug Robbins - Word MVP
mailman said:
yes Doug I have tried it but I am not sure if I have everything Ok here
for it to run properly. It is still stopping at the Do while ....I
appreciate your sincere effort to help me but because of lack of knowledge I
can't understand why it does not work . Am I suppose to add the name of my
files in your code , what should be open etc . Sorry but as much as I would
like to master more that vba knowledge, I am not a guru in it far from it.
It is only by God's grace that I can create and understand some of it. So it
could be all my fault why it is not working and really thank you again for
your effort and your precious time. I will send my stuff to Helmut but I am
open still to your help , no preference here , I do not want to abuse of
your patience . In my ignorance I might not realize it. Thanks again
 
H

Helmut Weber

Hi Doug, hi Gilles,
as I supposed, the one example text document I got is all
messed up with all so naturally human typing errors. I found
double spaces, triple spaces, numbers that are supposed to be
at the end of a paragraph and followed by a full stop "."
(a dot it may be in modern american english), not being at the end
of a paragraph, but at the end of a line and not followed by "."
I found "7BC, 959", which should be "7BC 959" at least.
And there will be more unexpected variations.
So what can be done?
Gilles, take a break, pause, and try to understand,
that the success of applying automatisms to something
that is highly irregular, must fail in most cases.
The task is at first, to remove as many of the irregularities
in the docs as you can think of. If you could remove all, then
Doug's or some other grandmasters' here macros would run like *+#.
(No such words here).
---
Keep on.
Greetings from Bavaria, Germany
Helmut Weber, MVP
"red.sys" & chr(64) & "t-online.de"
Word XP, Win 98
 
M

mailman

thanks for your honesty and time of looking at it. Now I wonder if my old way of doing them was not better for me , one macro for each one. It was working fine but thought it could be done faster your ways. I will think about it now
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top