I created a template that prompts the user using Ask field codes as well as
Fill In field codes.

The problem I am having now is I need to ask a Yes or No question. If yes,
I need to include a paragraph of verbiage as well as adding another page to
the end of the document. I researched the If statements, Include Text field
code and Cross References. I do not know VB too well. The user did not want
a user form. I am on the right track or does anyone have a better idea.

Thanks!

Re: Word Template by Doug

Doug
Tue Apr 01 12:43:29 PDT 2008

The User is wrong. A userform would be a much better method.

However, if you have an autotext entry saved as yes, you could use the
following with a dropdown type formfield as used in a protected document:

' Macro2 Macro

' Macro created 15-11-97 by Doug Robbins to add the address corresponding to
a drop down name

'

Set myDrop = ActiveDocument.FormFields("Dropdown1").DropDown

Company = myDrop.ListEntries(myDrop.Value).Name

Address = ActiveDocument.AttachedTemplate.AutoTextEntries(Company).Value

ActiveDocument.FormFields("Text1").Result = Address

You may also be able to do it with a fillin or ask field inside an
If...then...Else field construction, but I have not tried as I would use a
userform instead.


--
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

"jlo" <jlo@discussions.microsoft.com> wrote in message
news:ACA3E785-6963-4ED4-98B1-FE073AD4F705@microsoft.com...
>I created a template that prompts the user using Ask field codes as well as
> Fill In field codes.
>
> The problem I am having now is I need to ask a Yes or No question. If
> yes,
> I need to include a paragraph of verbiage as well as adding another page
> to
> the end of the document. I researched the If statements, Include Text
> field
> code and Cross References. I do not know VB too well. The user did not
> want
> a user form. I am on the right track or does anyone have a better idea.
>
> Thanks!



Re: Word Template by jlo

jlo
Wed Apr 02 11:44:01 PDT 2008

Thank you.

"Doug Robbins - Word MVP" wrote:

> The User is wrong. A userform would be a much better method.
>
> However, if you have an autotext entry saved as yes, you could use the
> following with a dropdown type formfield as used in a protected document:
>
> ' Macro2 Macro
>
> ' Macro created 15-11-97 by Doug Robbins to add the address corresponding to
> a drop down name
>
> '
>
> Set myDrop = ActiveDocument.FormFields("Dropdown1").DropDown
>
> Company = myDrop.ListEntries(myDrop.Value).Name
>
> Address = ActiveDocument.AttachedTemplate.AutoTextEntries(Company).Value
>
> ActiveDocument.FormFields("Text1").Result = Address
>
> You may also be able to do it with a fillin or ask field inside an
> If...then...Else field construction, but I have not tried as I would use a
> userform instead.
>
>
> --
> 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
>
> "jlo" <jlo@discussions.microsoft.com> wrote in message
> news:ACA3E785-6963-4ED4-98B1-FE073AD4F705@microsoft.com...
> >I created a template that prompts the user using Ask field codes as well as
> > Fill In field codes.
> >
> > The problem I am having now is I need to ask a Yes or No question. If
> > yes,
> > I need to include a paragraph of verbiage as well as adding another page
> > to
> > the end of the document. I researched the If statements, Include Text
> > field
> > code and Cross References. I do not know VB too well. The user did not
> > want
> > a user form. I am on the right track or does anyone have a better idea.
> >
> > Thanks!
>
>
>