Sales Proposal

S

Suzanne

I don't know if this even can be done.

I need to create a sales proposal template that has some
information that is always the same. There will also be
information required that will be different for each
proposal. I would like to be able to have 3 options for
the sales person to pick and when they do it would insert
the text (from another document or some other place more
convenient) and remove the other two options. This
needless to say would have to happen several times
through the document.

Can this be done? I am assuming the I would have to use
VBA to do this - I need some assistance as no one at my
office seems to know.

Thanks
 
D

DA

Hi Suzanne

Firstly, there's a myriad of ways you can achieve what
you're trying to do. Below, I've given you one of those.
I'm not saying this is the best way, but it's light on
code and I hope it will give you at least some basic
insight into controls, and how to work them using VBA. If
you want to learn more about how to interact with forms
and controls using VBA, go to
(http://word.mvps.org/index.html), where you'll find many
articles that can help you gain a better understanding.

Anyhow, enough babble - here's my suggestion. Follow
these steps:
1) Set up your document and write it so that it contains
all of your sections (even those you want to select
from). What you will do is to selectively hide and
display those sections based on user input.

2) Assign a bookmark to each of the sections you want to
hide or display. Do this by selecting the text and then
choose Insert>Bookmark. Give each section a meaningful
name so you can easily reference them in the VBA code
later.

3) Now right-click on a blank area of your toolbar and
enable the "Control Toolbox" toolbar. Before each section
where you want the user to select their option, place a
series of checkboxes (one for each option/section). If
you right-click on a checkbox (you need to be in design
mode for this), choose properties from the context menu.
In the "(Name)" field, enter a label for that checkbox
which again corresponds to the section you want to hide
or display.

4)Highlight the line that contains your checkboxes, then
choose Format>Font. Enable the "Hidden" attribute and
click on OK. There are two ways you can see hidden text.
Either press the "Show/Hide" button on your Standard
toolbar, or go into your Word options and under
the "Print" tab, enable the "Hidden Text" checkbox. My
suggestion is that you use the "Show/Hide" button since
you want to only see the checkboxes and text on screen,
not on the printed page.

5) Back to those checkboxes. Once again in "Design Mode",
double-click on a checkbox. You'll see a code window pop
up with a Sub routine to corresponds to the "_Click"
event for that checkbox.

6) Paste the following code into that routine. Replace
the items marked <> with the labels you applied from the
above steps.

ActiveDocument.Bookmarks("<bookmark name>").Select
If ThisDocument.<The checkbox name>.Value = True Then
Selection.Range.Font.Hidden = False
Else
Selection.Range.Font.Hidden = True
End If

7) Now do this for all the sections you want to have as
an option.

Best of luck,
Dennis
 

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