What would be the best way to set this up?

R

Rosemary Hage

Hi,

We have a document that has variable paragraphs. We
assemble it each time we want to create it by selecting
from about 70 different paragraphs. These individual
paragraphs currently reside in individual files in a
folder on our network drive. The operator assembles the
document by using Insert-File for every individual
paragraph they want to use in the document.

Is there a better way to set this up? Would a merge be
better? The individual paragraphs can be up to a page in
length.

Many thanks,
Rosemary
 
G

Graham Mayor

If these files follow one after another - then you may find the boiler.zip
file on the downloads page of my web site useful.
Another way might be to save the paragraphs as autotext entries in the
document template.
I suppose you could instead save them as autocorrect entries and assign a
set of unique codes to them, but with 70 to choose from your naming
convention may prove a little taxing on the memory.

--
<>>< ><<> ><<> <>>< ><<> <>>< <>>< ><<>
Graham Mayor - Word MVP

Web site www.gmayor.com
Word MVP web site www.mvps.org/word
<>>< ><<> ><<> <>>< ><<> <>>< <>>< ><<>
 
G

Guest

Hi Graham,

Your macro would be great for this purpose. Our system
works off the central server (pc's act as terminal
stations only). I cannot access the Startup folder,
however I can have our engineers do so. But first I
wanted to check with you - can the macro be adapted so we
can store it in Word's templates folder instead, and then
retrieve it using File-New?

Thanks very much,
Rosemary
 
G

Graham Mayor

The macro is designed to be used as an add-in and as written can only access
the files in a single folder, which must be defined in it according to the
instructions. For it to work automatically as an add-in, you need to place
it in the startup folder. You can however, place it in *any* folder and add
it to the list of installed add-ins in tools > templates and add-ins.

Such an add-in will only be installed automatically if it is in either the
Word or Office startup folder. If it is in any other folder, you need to
check the box alongside it. If you are allowed to save macros, then you
could add an autoopen and an autonew macro to the document template
containing the following line (or add the line to existing autoopen and
autonew macros)

AddIns("C:\path\Boiler.dot").Installed = True

where path is the folder you have filed boiler.dot in.

I'll bet you can't edit the document template, but if you can edit
normal.dot (which you should be able to do if Word has been installed
sympathetically) then you can add a toolbar button to call the following
macro

Sub ToggleBoiler()
AddIns("C:\path\Boiler.dot").Installed = Not .Installed
End Sub

again the path needs to be changed - and this macro will not work if the
template has not been manually added to the add-in list. You can then click
the button to make the template available or not as required.

--
<>>< ><<> ><<> <>>< ><<> <>>< <>>< ><<>
Graham Mayor - Word MVP

Web site www.gmayor.com
Word MVP web site www.mvps.org/word
<>>< ><<> ><<> <>>< ><<> <>>< <>>< ><<>
 
R

Rosemary Hage

Thanks very much, Graham.
-----Original Message-----
The macro is designed to be used as an add-in and as written can only access
the files in a single folder, which must be defined in it according to the
instructions. For it to work automatically as an add-in, you need to place
it in the startup folder. You can however, place it in *any* folder and add
it to the list of installed add-ins in tools > templates and add-ins.

Such an add-in will only be installed automatically if it is in either the
Word or Office startup folder. If it is in any other folder, you need to
check the box alongside it. If you are allowed to save macros, then you
could add an autoopen and an autonew macro to the document template
containing the following line (or add the line to existing autoopen and
autonew macros)

AddIns("C:\path\Boiler.dot").Installed = True

where path is the folder you have filed boiler.dot in.

I'll bet you can't edit the document template, but if you can edit
normal.dot (which you should be able to do if Word has been installed
sympathetically) then you can add a toolbar button to call the following
macro

Sub ToggleBoiler()
AddIns("C:\path\Boiler.dot").Installed = Not .Installed
End Sub

again the path needs to be changed - and this macro will not work if the
template has not been manually added to the add-in list. You can then click
the button to make the template available or not as required.

--
<>>< ><<> ><<> <>>< ><<> <>>< <>>< ><<>
Graham Mayor - Word MVP

Web site www.gmayor.com
Word MVP web site www.mvps.org/word
<>>< ><<> ><<> <>>< ><<> <>>< <>>< ><<>







.
 
G

Guest

Hi, Graham -

One more question . . . I placed the boiler.dot file in
the Microsoft Word Startup folder. I also added it via
Tools Templates Add-Ins, where it does show up and is
checked.

However boiler.dot does not appear among the templates
when I select File - New. What might I be doing wrong?

Thanks again!
Rosemary
 
G

Graham Mayor

It is not supposed to appear in file > new. It adds a macro to Word which
becomes available in all documents. Locate the macro StartBoiler and run
that (tools > macro > macros). You can add the macro to a toolbar with tools
customize. Actually I thought the toolbar was present in the template.
I'll check when I get a minute.

Do check the reame file that accompanies the template which explains how to
edit it to use the folder where *your* documents are located.

--
<>>< ><<> ><<> <>>< ><<> <>>< <>>< ><<>
Graham Mayor - Word MVP

Web site www.gmayor.com
Word MVP web site www.mvps.org/word
<>>< ><<> ><<> <>>< ><<> <>>< <>>< ><<>
 
G

Graham Mayor

I have checked and the add-in should put a toolbar into Word called - would
you believe? - Boiler. You should find the Start Boiler command amongst your
toolbars.

--
<>>< ><<> ><<> <>>< ><<> <>>< <>>< ><<>
Graham Mayor - Word MVP

Web site www.gmayor.com
Word MVP web site www.mvps.org/word
<>>< ><<> ><<> <>>< ><<> <>>< <>>< ><<>
 
G

Guest

Hi Graham --

Sorry about that! It was a hectic day yesterday at work,
and I didn't notice the button on the toolbar! But when I
got home and saw the button on the toolbar. Thanks for
all your help - this macro is great!

Regards,
Rosemary
 
G

Graham Mayor

You are welcome - but I only provided the macro, Woody Leonard wrote it.

The original has long since been removed from his web site, but as it is
handy he has given his approval for it to be available from mine. It needs a
re-write to make it more versatile - user folder selection would be a
start - but until I get time, it works quite well as it stands.

--
<>>< ><<> ><<> <>>< ><<> <>>< <>>< ><<>
Graham Mayor - Word MVP

Web site www.gmayor.com
Word MVP web site www.mvps.org/word
<>>< ><<> ><<> <>>< ><<> <>>< <>>< ><<>
 

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