Hi, I want to create a template that asks multiple questions and then based
on the user's answers, inserts relevant text and form fields. For example:

Question: Do you require packing service?
If the answer is Yes, then insert
(Heading format) Packing Charges:
(Form Field - Drop down) (Form Field - Text Currency)
If the answer is No, insert nothing

Question: Do you require additional services?
If the user answers Yes then insert
(Heading Format) Additional Service Charges:
If the answer is No, insert nothing

Question: Do you require car transport?
If user answers Yes then insert (under additional services heading from above)
(Form field - Dropdown) (Form field - Text Currency)
If No, insert nothing

Etc. there are a lot more options but I can create them later - if I can
even achieve this!

Re: Userform data to create form fields by Graham

Graham
Tue Jun 06 00:17:22 CDT 2006

See if http://www.gmayor.com/SelectFile.htm will suit you?

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

My web site www.gmayor.com
Word MVP web site http://word.mvps.org
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>

ivory_kitten wrote:
> Hi, I want to create a template that asks multiple questions and then
> based on the user's answers, inserts relevant text and form fields.
> For example:
>
> Question: Do you require packing service?
> If the answer is Yes, then insert
> (Heading format) Packing Charges:
> (Form Field - Drop down) (Form Field - Text Currency)
> If the answer is No, insert nothing
>
> Question: Do you require additional services?
> If the user answers Yes then insert
> (Heading Format) Additional Service Charges:
> If the answer is No, insert nothing
>
> Question: Do you require car transport?
> If user answers Yes then insert (under additional services heading
> from above) (Form field - Dropdown) (Form field - Text Currency)
> If No, insert nothing
>
> Etc. there are a lot more options but I can create them later - if I
> can even achieve this!



Re: Userform data to create form fields by ivorykitten

ivorykitten
Tue Jun 06 00:34:01 CDT 2006

Yes, but I do not want the questions to form part of the document

"Graham Mayor" wrote:

> See if http://www.gmayor.com/SelectFile.htm will suit you?
>
> --
> <>>< ><<> ><<> <>>< ><<> <>>< <>><<>
> Graham Mayor - Word MVP
>
> My web site www.gmayor.com
> Word MVP web site http://word.mvps.org
> <>>< ><<> ><<> <>>< ><<> <>>< <>><<>
>
> ivory_kitten wrote:
> > Hi, I want to create a template that asks multiple questions and then
> > based on the user's answers, inserts relevant text and form fields.
> > For example:
> >
> > Question: Do you require packing service?
> > If the answer is Yes, then insert
> > (Heading format) Packing Charges:
> > (Form Field - Drop down) (Form Field - Text Currency)
> > If the answer is No, insert nothing
> >
> > Question: Do you require additional services?
> > If the user answers Yes then insert
> > (Heading Format) Additional Service Charges:
> > If the answer is No, insert nothing
> >
> > Question: Do you require car transport?
> > If user answers Yes then insert (under additional services heading
> > from above) (Form field - Dropdown) (Form field - Text Currency)
> > If No, insert nothing
> >
> > Etc. there are a lot more options but I can create them later - if I
> > can even achieve this!
>
>
>

Re: Userform data to create form fields by Doug

Doug
Tue Jun 06 06:50:33 CDT 2006

Put the questions in a userform. probably as the captions to checkboxes and
then have a command button that iterates through the checkboxes on the
userform, inserting the appropriate files into the document based on the
status of the checkbox.

--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP

"ivory_kitten" <ivorykitten@discussions.microsoft.com> wrote in message
news:4C2DE89B-C11E-4EA6-8B9B-8FC17BC7120D@microsoft.com...
> Yes, but I do not want the questions to form part of the document
>
> "Graham Mayor" wrote:
>
>> See if http://www.gmayor.com/SelectFile.htm will suit you?
>>
>> --
>> <>>< ><<> ><<> <>>< ><<> <>>< <>><<>
>> Graham Mayor - Word MVP
>>
>> My web site www.gmayor.com
>> Word MVP web site http://word.mvps.org
>> <>>< ><<> ><<> <>>< ><<> <>>< <>><<>
>>
>> ivory_kitten wrote:
>> > Hi, I want to create a template that asks multiple questions and then
>> > based on the user's answers, inserts relevant text and form fields.
>> > For example:
>> >
>> > Question: Do you require packing service?
>> > If the answer is Yes, then insert
>> > (Heading format) Packing Charges:
>> > (Form Field - Drop down) (Form Field - Text Currency)
>> > If the answer is No, insert nothing
>> >
>> > Question: Do you require additional services?
>> > If the user answers Yes then insert
>> > (Heading Format) Additional Service Charges:
>> > If the answer is No, insert nothing
>> >
>> > Question: Do you require car transport?
>> > If user answers Yes then insert (under additional services heading
>> > from above) (Form field - Dropdown) (Form field - Text Currency)
>> > If No, insert nothing
>> >
>> > Etc. there are a lot more options but I can create them later - if I
>> > can even achieve this!
>>
>>
>>



Re: Userform data to create form fields by ivorykitten

ivorykitten
Tue Jun 06 07:49:01 CDT 2006

I have got as far as the frames with the radio buttons for Yes or No, and
have the a Submit command button, am unsure how to write the code to evaluate
the responses.

Would it be better to do this using a table and show/hide rows based on the
userform responses?

You have been most helpful on all my queries!

"Doug Robbins - Word MVP" wrote:

> Put the questions in a userform. probably as the captions to checkboxes and
> then have a command button that iterates through the checkboxes on the
> userform, inserting the appropriate files into the document based on the
> status of the checkbox.
>
> --
> Hope this helps.
>
> Please reply to the newsgroup unless you wish to avail yourself of my
> services on a paid consulting basis.
>
> Doug Robbins - Word MVP
>
> "ivory_kitten" <ivorykitten@discussions.microsoft.com> wrote in message
> news:4C2DE89B-C11E-4EA6-8B9B-8FC17BC7120D@microsoft.com...
> > Yes, but I do not want the questions to form part of the document
> >
> > "Graham Mayor" wrote:
> >
> >> See if http://www.gmayor.com/SelectFile.htm will suit you?
> >>
> >> --
> >> <>>< ><<> ><<> <>>< ><<> <>>< <>><<>
> >> Graham Mayor - Word MVP
> >>
> >> My web site www.gmayor.com
> >> Word MVP web site http://word.mvps.org
> >> <>>< ><<> ><<> <>>< ><<> <>>< <>><<>
> >>
> >> ivory_kitten wrote:
> >> > Hi, I want to create a template that asks multiple questions and then
> >> > based on the user's answers, inserts relevant text and form fields.
> >> > For example:
> >> >
> >> > Question: Do you require packing service?
> >> > If the answer is Yes, then insert
> >> > (Heading format) Packing Charges:
> >> > (Form Field - Drop down) (Form Field - Text Currency)
> >> > If the answer is No, insert nothing
> >> >
> >> > Question: Do you require additional services?
> >> > If the user answers Yes then insert
> >> > (Heading Format) Additional Service Charges:
> >> > If the answer is No, insert nothing
> >> >
> >> > Question: Do you require car transport?
> >> > If user answers Yes then insert (under additional services heading
> >> > from above) (Form field - Dropdown) (Form field - Text Currency)
> >> > If No, insert nothing
> >> >
> >> > Etc. there are a lot more options but I can create them later - if I
> >> > can even achieve this!
> >>
> >>
> >>
>
>
>

Re: Userform data to create form fields by Doug

Doug
Tue Jun 06 13:58:13 CDT 2006

I would think that it would be a lot simpler to use a checkbox for each item
rather than radio buttons. You should give each checkbox a name that bears
some relationship to its purpose. Then you have to iterate through the
checkboxes and determine their value and take the appropriate action. In
the template, you could have each piece of data that may or may not be
deleted inside a bookmark, once again with a meaningful name and you just
delete the .Range of the bookmarks that are related to the unchecked
checkboxes.

--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP

"ivory_kitten" <ivorykitten@discussions.microsoft.com> wrote in message
news:D1B688FD-3B1E-4AB6-AB0C-425B0D54555F@microsoft.com...
>I have got as far as the frames with the radio buttons for Yes or No, and
> have the a Submit command button, am unsure how to write the code to
> evaluate
> the responses.
>
> Would it be better to do this using a table and show/hide rows based on
> the
> userform responses?
>
> You have been most helpful on all my queries!
>
> "Doug Robbins - Word MVP" wrote:
>
>> Put the questions in a userform. probably as the captions to checkboxes
>> and
>> then have a command button that iterates through the checkboxes on the
>> userform, inserting the appropriate files into the document based on the
>> status of the checkbox.
>>
>> --
>> Hope this helps.
>>
>> Please reply to the newsgroup unless you wish to avail yourself of my
>> services on a paid consulting basis.
>>
>> Doug Robbins - Word MVP
>>
>> "ivory_kitten" <ivorykitten@discussions.microsoft.com> wrote in message
>> news:4C2DE89B-C11E-4EA6-8B9B-8FC17BC7120D@microsoft.com...
>> > Yes, but I do not want the questions to form part of the document
>> >
>> > "Graham Mayor" wrote:
>> >
>> >> See if http://www.gmayor.com/SelectFile.htm will suit you?
>> >>
>> >> --
>> >> <>>< ><<> ><<> <>>< ><<> <>>< <>><<>
>> >> Graham Mayor - Word MVP
>> >>
>> >> My web site www.gmayor.com
>> >> Word MVP web site http://word.mvps.org
>> >> <>>< ><<> ><<> <>>< ><<> <>>< <>><<>
>> >>
>> >> ivory_kitten wrote:
>> >> > Hi, I want to create a template that asks multiple questions and
>> >> > then
>> >> > based on the user's answers, inserts relevant text and form fields.
>> >> > For example:
>> >> >
>> >> > Question: Do you require packing service?
>> >> > If the answer is Yes, then insert
>> >> > (Heading format) Packing Charges:
>> >> > (Form Field - Drop down) (Form Field - Text Currency)
>> >> > If the answer is No, insert nothing
>> >> >
>> >> > Question: Do you require additional services?
>> >> > If the user answers Yes then insert
>> >> > (Heading Format) Additional Service Charges:
>> >> > If the answer is No, insert nothing
>> >> >
>> >> > Question: Do you require car transport?
>> >> > If user answers Yes then insert (under additional services heading
>> >> > from above) (Form field - Dropdown) (Form field - Text Currency)
>> >> > If No, insert nothing
>> >> >
>> >> > Etc. there are a lot more options but I can create them later - if
>> >> > I
>> >> > can even achieve this!
>> >>
>> >>
>> >>
>>
>>
>>



Re: Userform data to create form fields by ivorykitten

ivorykitten
Tue Jun 06 17:51:02 CDT 2006

Ok, I have three checkboxes called Packing, Storage, Additional Services.
How do I use them to insert the data in to my document?

Like if Packing = true then insert "Text & form fields"

Can you use VBA to insert form fields?

"Doug Robbins - Word MVP" wrote:

> I would think that it would be a lot simpler to use a checkbox for each item
> rather than radio buttons. You should give each checkbox a name that bears
> some relationship to its purpose. Then you have to iterate through the
> checkboxes and determine their value and take the appropriate action. In
> the template, you could have each piece of data that may or may not be
> deleted inside a bookmark, once again with a meaningful name and you just
> delete the .Range of the bookmarks that are related to the unchecked
> checkboxes.
>
> --
> Hope this helps.
>
> Please reply to the newsgroup unless you wish to avail yourself of my
> services on a paid consulting basis.
>
> Doug Robbins - Word MVP
>
> "ivory_kitten" <ivorykitten@discussions.microsoft.com> wrote in message
> news:D1B688FD-3B1E-4AB6-AB0C-425B0D54555F@microsoft.com...
> >I have got as far as the frames with the radio buttons for Yes or No, and
> > have the a Submit command button, am unsure how to write the code to
> > evaluate
> > the responses.
> >
> > Would it be better to do this using a table and show/hide rows based on
> > the
> > userform responses?
> >
> > You have been most helpful on all my queries!
> >
> > "Doug Robbins - Word MVP" wrote:
> >
> >> Put the questions in a userform. probably as the captions to checkboxes
> >> and
> >> then have a command button that iterates through the checkboxes on the
> >> userform, inserting the appropriate files into the document based on the
> >> status of the checkbox.
> >>
> >> --
> >> Hope this helps.
> >>
> >> Please reply to the newsgroup unless you wish to avail yourself of my
> >> services on a paid consulting basis.
> >>
> >> Doug Robbins - Word MVP
> >>
> >> "ivory_kitten" <ivorykitten@discussions.microsoft.com> wrote in message
> >> news:4C2DE89B-C11E-4EA6-8B9B-8FC17BC7120D@microsoft.com...
> >> > Yes, but I do not want the questions to form part of the document
> >> >
> >> > "Graham Mayor" wrote:
> >> >
> >> >> See if http://www.gmayor.com/SelectFile.htm will suit you?
> >> >>
> >> >> --
> >> >> <>>< ><<> ><<> <>>< ><<> <>>< <>><<>
> >> >> Graham Mayor - Word MVP
> >> >>
> >> >> My web site www.gmayor.com
> >> >> Word MVP web site http://word.mvps.org
> >> >> <>>< ><<> ><<> <>>< ><<> <>>< <>><<>
> >> >>
> >> >> ivory_kitten wrote:
> >> >> > Hi, I want to create a template that asks multiple questions and
> >> >> > then
> >> >> > based on the user's answers, inserts relevant text and form fields.
> >> >> > For example:
> >> >> >
> >> >> > Question: Do you require packing service?
> >> >> > If the answer is Yes, then insert
> >> >> > (Heading format) Packing Charges:
> >> >> > (Form Field - Drop down) (Form Field - Text Currency)
> >> >> > If the answer is No, insert nothing
> >> >> >
> >> >> > Question: Do you require additional services?
> >> >> > If the user answers Yes then insert
> >> >> > (Heading Format) Additional Service Charges:
> >> >> > If the answer is No, insert nothing
> >> >> >
> >> >> > Question: Do you require car transport?
> >> >> > If user answers Yes then insert (under additional services heading
> >> >> > from above) (Form field - Dropdown) (Form field - Text Currency)
> >> >> > If No, insert nothing
> >> >> >
> >> >> > Etc. there are a lot more options but I can create them later - if
> >> >> > I
> >> >> > can even achieve this!
> >> >>
> >> >>
> >> >>
> >>
> >>
> >>
>
>
>

Re: Userform data to create form fields by ivorykitten

ivorykitten
Tue Jun 06 20:23:01 CDT 2006

Ok, I got it working using the show/hide rows! I've kept it simple to start
with and have only 2 options on my UserForm (frmOptions): () = checkbox

Packing Option 1
() Required

Packing Option 2
() Required

My Code is:
Private Sub Submit_Click()
If Pack1 = True Then
With ActiveDocument
.Tables(1).Rows(5).Range.Font.Hidden = False
.Tables(1).Rows(6).Range.Font.Hidden = False
End With
Else
With ActiveDocument
.Tables(1).Rows(5).Range.Font.Hidden = True
.Tables(1).Rows(6).Range.Font.Hidden = True
End With
End If
If Pack2 = True Then
With ActiveDocument
.Tables(1).Rows(7).Range.Font.Hidden = False
End With
Else
With ActiveDocument
.Tables(1).Rows(7).Range.Font.Hidden = True
End With
End If
Unload Me
End Sub

YAY!!!!


"Doug Robbins - Word MVP" wrote:

> I would think that it would be a lot simpler to use a checkbox for each item
> rather than radio buttons. You should give each checkbox a name that bears
> some relationship to its purpose. Then you have to iterate through the
> checkboxes and determine their value and take the appropriate action. In
> the template, you could have each piece of data that may or may not be
> deleted inside a bookmark, once again with a meaningful name and you just
> delete the .Range of the bookmarks that are related to the unchecked
> checkboxes.
>
> --
> Hope this helps.
>
> Please reply to the newsgroup unless you wish to avail yourself of my
> services on a paid consulting basis.
>
> Doug Robbins - Word MVP
>
> "ivory_kitten" <ivorykitten@discussions.microsoft.com> wrote in message
> news:D1B688FD-3B1E-4AB6-AB0C-425B0D54555F@microsoft.com...
> >I have got as far as the frames with the radio buttons for Yes or No, and
> > have the a Submit command button, am unsure how to write the code to
> > evaluate
> > the responses.
> >
> > Would it be better to do this using a table and show/hide rows based on
> > the
> > userform responses?
> >
> > You have been most helpful on all my queries!
> >
> > "Doug Robbins - Word MVP" wrote:
> >
> >> Put the questions in a userform. probably as the captions to checkboxes
> >> and
> >> then have a command button that iterates through the checkboxes on the
> >> userform, inserting the appropriate files into the document based on the
> >> status of the checkbox.
> >>
> >> --
> >> Hope this helps.
> >>
> >> Please reply to the newsgroup unless you wish to avail yourself of my
> >> services on a paid consulting basis.
> >>
> >> Doug Robbins - Word MVP
> >>
> >> "ivory_kitten" <ivorykitten@discussions.microsoft.com> wrote in message
> >> news:4C2DE89B-C11E-4EA6-8B9B-8FC17BC7120D@microsoft.com...
> >> > Yes, but I do not want the questions to form part of the document
> >> >
> >> > "Graham Mayor" wrote:
> >> >
> >> >> See if http://www.gmayor.com/SelectFile.htm will suit you?
> >> >>
> >> >> --
> >> >> <>>< ><<> ><<> <>>< ><<> <>>< <>><<>
> >> >> Graham Mayor - Word MVP
> >> >>
> >> >> My web site www.gmayor.com
> >> >> Word MVP web site http://word.mvps.org
> >> >> <>>< ><<> ><<> <>>< ><<> <>>< <>><<>
> >> >>
> >> >> ivory_kitten wrote:
> >> >> > Hi, I want to create a template that asks multiple questions and
> >> >> > then
> >> >> > based on the user's answers, inserts relevant text and form fields.
> >> >> > For example:
> >> >> >
> >> >> > Question: Do you require packing service?
> >> >> > If the answer is Yes, then insert
> >> >> > (Heading format) Packing Charges:
> >> >> > (Form Field - Drop down) (Form Field - Text Currency)
> >> >> > If the answer is No, insert nothing
> >> >> >
> >> >> > Question: Do you require additional services?
> >> >> > If the user answers Yes then insert
> >> >> > (Heading Format) Additional Service Charges:
> >> >> > If the answer is No, insert nothing
> >> >> >
> >> >> > Question: Do you require car transport?
> >> >> > If user answers Yes then insert (under additional services heading
> >> >> > from above) (Form field - Dropdown) (Form field - Text Currency)
> >> >> > If No, insert nothing
> >> >> >
> >> >> > Etc. there are a lot more options but I can create them later - if
> >> >> > I
> >> >> > can even achieve this!
> >> >>
> >> >>
> >> >>
> >>
> >>
> >>
>
>
>