![]() |
#7
|
||||
|
||||
![]()
Cross references of any kind actually do use hidden bookmarks which can only occur once in a document. But the basic setup for having language-specific content is not that complicated. Attached is a file showing how I set up a sample with content controls tagged with a language-specific code along with a macro that allows the user to select which language should be shown.
Code:
Sub LocaliseMe() Dim aCC As ContentControl, sLang As String sLang = InputBox("What language should be displayed? Your choices are: EN, DE, All", _ "Choose Language Code", "All") For Each aCC In ActiveDocument.ContentControls Select Case sLang Case aCC.Tag aCC.Range.Font.Hidden = False Case "All" aCC.Range.Font.Hidden = False Case Else aCC.Range.Font.Hidden = True End Select Next aCC 'set options to make ensure hidden text is not displayed on screen ActiveWindow.View.ShowAll = False ActiveWindow.View.ShowHiddenText = False End Sub
__________________
Andrew Lockton Chrysalis Design, Melbourne Australia |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
How to redact words listed in one document from the current document | AlanofBayCourt | Word VBA | 0 | 10-31-2019 03:00 AM |
Revise tables in a word document based on a reference table in excel | modiria50989 | Word VBA | 1 | 08-29-2017 03:07 PM |
![]() |
dineshtgs | Word Tables | 1 | 04-07-2011 01:27 AM |
Copying tables to MS Word | 123 | Word Tables | 1 | 03-02-2011 11:25 AM |
Copying format between tables. | daeron | Word Tables | 0 | 06-11-2010 12:09 AM |