hi, I trying to create a dropdown box in word doc which can hide/show my bookmarked text. anyone can help?
I can create via the checkbox (hide/unhide) but can't do it for dropdown.
hi, I trying to create a dropdown box in word doc which can hide/show my bookmarked text. anyone can help?
I can create via the checkbox (hide/unhide) but can't do it for dropdown.
What kind of 'dropbox' are you using and how are you doing this via a checkbox?
Cheers
Paul Edstein
[Fmr MS MVP - Word]
hi, want to create a combo box macro to control the visibility of my text. anyway, I managed to do it using vba script. thanks!
thamgrace,
I am trying to do the same thing, how did you end up solving this? Any help is much appreciated.
create a drop down list with variables "A" and "B"
create your text and book marked as "A" and "B"
---
Private Sub ComboBox1_DropButtonClick()
ComboBox1.List = Array("A", "B")
End Sub
Private Sub ComboBox1_change()
Call ShowHideBookmark
End Sub
Sub ShowHideBookmark()
Dim orange As Range
Set orange = ActiveDocument.Bookmarks("A").Range
Set apple = ActiveDocument.Bookmarks("B").Range
If ComboBox1.Value = "B" Then
With orange.Font
.Hidden = True
End With
With apple.Font
.Hidden = False
End With
ElseIf ComboBox1.Value = "A" Then
With orange.Font
.Hidden = False
End With
With apple.Font
.Hidden = True
End With
End If
End Sub
Thamgrace,
Thanks! worked perfect!