I need to create a macro that has two option buttons.

If the user selects the first option button, a specific template using
singular language will run.

If the user selects the second option button, a specific template using
language for multiple signers will run.

Re: Macro allowing user to select one of two templates by Jezebel

Jezebel
Thu Sep 22 03:22:51 CDT 2005

Templates don't "run". Are you trying to do anything more than create a new
document using one of two possible templates?




"Chris Wagner" <ChrisWagner@discussions.microsoft.com> wrote in message
news:7625911A-A9CF-450E-B443-DBA47A3A60D1@microsoft.com...
>I need to create a macro that has two option buttons.
>
> If the user selects the first option button, a specific template using
> singular language will run.
>
> If the user selects the second option button, a specific template using
> language for multiple signers will run.



Re: Macro allowing user to select one of two templates by ChrisWagner

ChrisWagner
Thu Sep 22 07:29:02 CDT 2005

Sorry - my terminology is probably off.

I need a macro that would show a user form. The user form would show two
option buttons. Depending on which option button was active, one of two
templates would kick off.

"Jezebel" wrote:

> Templates don't "run". Are you trying to do anything more than create a new
> document using one of two possible templates?
>
>
>
>
> "Chris Wagner" <ChrisWagner@discussions.microsoft.com> wrote in message
> news:7625911A-A9CF-450E-B443-DBA47A3A60D1@microsoft.com...
> >I need to create a macro that has two option buttons.
> >
> > If the user selects the first option button, a specific template using
> > singular language will run.
> >
> > If the user selects the second option button, a specific template using
> > language for multiple signers will run.
>
>
>

Re: Macro allowing user to select one of two templates by Jonathan

Jonathan
Thu Sep 22 08:30:06 CDT 2005


"Chris Wagner" <ChrisWagner@discussions.microsoft.com> wrote in message
news:7D664C4C-0C4A-490D-BD96-5FACEC6EB32A@microsoft.com...
> Sorry - my terminology is probably off.
>
> I need a macro that would show a user form. The user form would show two
> option buttons. Depending on which option button was active, one of two
> templates would kick off.

Create a UserForm. Put two optionbuttons on it and one CommandButton

The OptionButtons will be named OptionButton1 and OptionButton2. Put
whatever captions you want on the three buttons.

In the Click event of the CommandButton, include the following code

If OptionButton1.Value Then
Documents.Add Template:="full path of template 1"
ElseIf OptionButton2.Value Then
Documents.Add Template:="full path of template 2"
Else
MsgBox "Make sure one of the template options has been selected
End If
Unload Me

Put the correct full pathnames of your two templates in the appropriate
places in the code.


--
Regards
Jonathan West - Word MVP
www.intelligentdocuments.co.uk
Please reply to the newsgroup
Keep your VBA code safe, sign the ClassicVB petition www.classicvb.org