Need ideas in creating a macro to break down a daisy-chain document.

L

lcm

I am trying to create a macro and cannot get a good feel of what to do
exactly. I type a daisy-chain document that may include up to 60 pages
sometimes. When I am done, I break them down individually and save
each page a different name that comes straight off of that particular
page. As of right now, this is requiring a lot of cutting and pasting.
I know there has to be a way to do this. Anyone have any ideas?
 
L

LH

Macro development does indeed start with asking a lot of questions. And
usually the answers narrow down what needs to be done, but there will
likely always be multiple ways of accomplishing the tasks. Start simply
and don't try to automate the entire process in one shot. Eventually
you can build macros that can also daisy-chain your pre-existing macros

You mention the title of the document is taken from a specific portion
of the page. Do you use a style for this portion? Or do you use a
field? Or pehaps you use a bookmark, which is a specific kind of field.
Can you create a macro that selects the portion without relying on what
the text specifically says, since it changes from document to
document.? Can you create a macro that selects the text between typical
documents, so that you can then cut and paste a little quicker.

If they are destined to be separate documents, why do they start as
one?
They share some common information between them
They are not always one-page documents, it varies from case to
case where they break apart
Should you create separate templates for each document? Should you
create a macro that opens the next type of document? Can autotext be
used to add or subtract key paragraphs in the document (legal docs
often have some boilerplate that is added or removed dependin on the
circumstance)

What I'm trying to get is that you almost have to write down all the
separate steps you use now, and identify which steps require a person
to stop and think about it versus those steps that are so automatic
that even Word could reliably do without getting input from you.

Since there may be common information between the documents, can you
identify those portions and use fields or bookmarks
 
L

lcm

LH said:
Macro development does indeed start with asking a lot of questions. And
usually the answers narrow down what needs to be done, but there will
likely always be multiple ways of accomplishing the tasks. Start simply
and don't try to automate the entire process in one shot. Eventually
you can build macros that can also daisy-chain your pre-existing macros

You mention the title of the document is taken from a specific portion
of the page. Do you use a style for this portion? Or do you use a
field? Or pehaps you use a bookmark, which is a specific kind of field.
Can you create a macro that selects the portion without relying on what
the text specifically says, since it changes from document to
document.? Can you create a macro that selects the text between typical
documents, so that you can then cut and paste a little quicker.

If they are destined to be separate documents, why do they start as
one?
They share some common information between them
They are not always one-page documents, it varies from case to
case where they break apart
Should you create separate templates for each document? Should you
create a macro that opens the next type of document? Can autotext be
used to add or subtract key paragraphs in the document (legal docs
often have some boilerplate that is added or removed dependin on the
circumstance)

What I'm trying to get is that you almost have to write down all the
separate steps you use now, and identify which steps require a person
to stop and think about it versus those steps that are so automatic
that even Word could reliably do without getting input from you.

Since there may be common information between the documents, can you
identify those portions and use fields or bookmarks
 
L

lcm

I wrote a long reply back and it does not seem to be showing. Did you
get this message somewhere else, LH?
 
L

lcm

LH said:
Afraid not. Please try again.

Okay, starting over again. I am a medical transcriptionist and I have
a couple of accounts that this macro I am trying to create would apply
to - but this one in particular is the most time-consuming and boring
because the notes are so short. I actually spend more time opening,
saving, and creating the document than I do typing the document. I
find it faster, a lot faster, to have a pre-made template that I just
type in. Then when I am done typing it everything, I go in and use a
combination of several macros to break them down into separate
documents. It makes it not quite so boring to do it this way also.
Each one is to be named the patients last name hyphen first name period
and the date dictated. So the report below would be named
Doe-John.031906

This first sample below is what a completed report would look like,
minus confidential information, but just to give you a rough idea. The
second sample is the actual template I start out with, but there are
about 60 duplicate pages in one template.
_______________________________________________________________

March 19, 2006


James Doe, M.D.
Make Believe Family Practice

Re: John Doe
DOB: 11/11/1911
Date of Consultation: 03/15/2006

Dear James:

I saw John Doe for...........

Physical findings showed ............

I recommend that the patient ..........

Sincerely,



Jane D. Doe, M.D.

JDD\ABC:lcm 0319-048

___________________________________________________________________

[, 2006

Re: [
DOB: [
Date of Consultation: [

Dear [:

[

Sincerely,



Jane D. Doe, M.D.

JDD\ABC:lcm [

_________________________________________________________________

I use the brackets in a macro to get from one spot to the next without
having to take my hands off the keyboard. The brackets are the
information that would vary between patients. After I type the whole
thing, I have a macro that copies/cuts the first page of the document,
opens up another template like this one (for margin purposes), deletes
everything on that document, and pastes the copied/cut selection text
from the original document to the new blank one. I then have a macro
where I put the cursor at the end of the patients last name. It pulls
the name, swaps it around, capitalizes the first letter of both the
first and last name, inserts a hyphen between the two, places a period
at the end, copies the date from the top line, pastes all info (the
entire file name ) at the end of the patients name, and then "cuts"it
from the document. I then hit F12 and Control V to paste the selection
into the File Name space and hit enter. I close the document and refer
back to the original document.

I hope I am not confusing you too much already.

I know that there is an easier way to combine my macros or create a new
macro that can do all of this in one keystroke or one touch of a
toolbar button, or (heck lets wish here) even break them all down and
create 60 individually named files at the touch of one button. It may
not seem like it would be any faster with all of these steps, but to me
it is. I have several accounts that operate like this, though others
want more information, such as doctor initials, my initials, patients
first and last name, the type of report it is, and the date the patient
was seen. I have macros that create the file names for me but I have
to run the macro, hit F12, Control V, Enter, and then close the
document or jump to the next bracket in the document to continue
typing.

The second problem I have run into has something to do with the VBA
codes. I find that when trying to paste copied selection and save -
all within the macro - that whatever text is selected at the time of
creating the macro is the text that will be pasted every time I run the
macro as opposed to copying the new information each time. My macros
are all created with the "Record New Macro" feature. I am not real
familiar with these codes but need to learn.

I am not wanting someone to just do this for me. I actually want to
learn so that I may apply this to my other macros as well. I have come
a long way with macro building over the last 3 years but I know that
there is so much more to learn.

I appreciate any help you can offer me with my macro-building dilemma.
 

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