Wrox Programmer Forums
|
Word VBA Discuss using VBA to program Word.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Word VBA section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old September 25th, 2006, 06:32 PM
Registered User
 
Join Date: Sep 2006
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to Shiamak
Default Multiple Templates

I have a .dot file that contains 3 templates, I would like to show one template at a time.

For instance I have 3 radio buttons, if user click on Radiop button 1 then i wanna show only 1st template and hide the rest... is it doable?

if yes the how?

TIA


 
Old September 29th, 2006, 08:35 AM
Authorized User
 
Join Date: Sep 2006
Posts: 10
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hi there,

How did you create multiple templates within one .dot file? Once I know how you did that I might be able to suggest how to show one at a time!
Cheers

 
Old December 29th, 2006, 04:21 AM
GLM GLM is offline
Authorized User
 
Join Date: Dec 2006
Posts: 10
Thanks: 0
Thanked 0 Times in 0 Posts
Default

use Addin object
and its properties:
name, path, index, installed.

Remember - you cannot refer to the addin which is not instaled (just listed) by its index!

glm
 
Old January 8th, 2007, 07:49 PM
Registered User
 
Join Date: Jan 2007
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I assume you have three pages or sections in a single template and you want to have the radio button control which is visible.

'Try creating a bookmark for each section of the template (Name1) (Name2) (Name3) Format all the text in the template except for the radio button as hidden.

'within the macro.
' set show hidden text to false
    With ActiveWindow
        With .View
            .ShowHiddenText = False
        End With
    End With

' Depending which radio button is selected select the other bookmarks and set the text to hidden for the two not chosen and not hidden for the one selected'

Selection.GoTo what:=wdGoToBookmark, Name:="Name1"
    With Selection.Font
    Hidden = True
    End With
Selection.GoTo what:=wdGoToBookmark, Name:="Name2"
    With Selection.Font
    Hidden = True
    End With
Selection.GoTo what:=wdGoToBookmark, Name:="Name2"
    With Selection.Font
    Hidden = False
    End With






Similar Threads
Thread Thread Starter Forum Replies Last Post
"templates" Somesh ASP.NET 2.0 Professional 8 March 27th, 2007 08:53 AM
Templates pilcher85 Dreamweaver (all versions) 1 March 21st, 2007 05:51 PM
Templates ervinel Classic ASP Basics 0 July 13th, 2006 02:47 PM
Can I 'apply-templates' across multiple XML docume mphare XSLT 1 June 8th, 2006 05:12 PM
multiple templates in datagrid msrnivas .NET Web Services 1 August 16th, 2004 06:01 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.