M
Michael F
Hi,
I wrote a macro that uses inputbox$ to display several bookmarks in the
prompt and go to the bookmark that I enter in the input field.
How do you display those choices in a pulldown menu? I can't figure out what
type of statement allows you to create a pulldown menu.
Michael F.
====================
Sub GotoBookmark()
'
' GotoBookmark Macro
' 7/19/2006 - GotoBookmark by Michael Frascinella
' 7/27/06 - added more chapters
' Prompt to select a chapter bookmark.
Dim Title, Prompt, default_value, Response As String
Title = "Chapter Bookmarks" ' Define title.
' Define the message.
Prompt = "Select a bookmark to go to:" & vbCrLf & _
"chapter1" & vbCrLf & _
"chapter2" & vbCrLf & _
"chapter3" & vbCrLf & _
"chapter4" & vbCrLf & _
"chapter5" & vbCrLf & _
"chapter6" & vbCrLf & _
"chapter7" & vbCrLf & _
"chapter8" & vbCrLf & _
"chapter9" & vbCrLf & _
"chapter10"
default_value = "chapter"
Response = InputBox$(Prompt, Title, default_value)
Selection.GoTo What:=wdGoToBookmark, Name:=Response
Selection.Find.ClearFormatting
End Sub
I wrote a macro that uses inputbox$ to display several bookmarks in the
prompt and go to the bookmark that I enter in the input field.
How do you display those choices in a pulldown menu? I can't figure out what
type of statement allows you to create a pulldown menu.
Michael F.
====================
Sub GotoBookmark()
'
' GotoBookmark Macro
' 7/19/2006 - GotoBookmark by Michael Frascinella
' 7/27/06 - added more chapters
' Prompt to select a chapter bookmark.
Dim Title, Prompt, default_value, Response As String
Title = "Chapter Bookmarks" ' Define title.
' Define the message.
Prompt = "Select a bookmark to go to:" & vbCrLf & _
"chapter1" & vbCrLf & _
"chapter2" & vbCrLf & _
"chapter3" & vbCrLf & _
"chapter4" & vbCrLf & _
"chapter5" & vbCrLf & _
"chapter6" & vbCrLf & _
"chapter7" & vbCrLf & _
"chapter8" & vbCrLf & _
"chapter9" & vbCrLf & _
"chapter10"
default_value = "chapter"
Response = InputBox$(Prompt, Title, default_value)
Selection.GoTo What:=wdGoToBookmark, Name:=Response
Selection.Find.ClearFormatting
End Sub