You can call a subroutine using the value of a bookmark with something like
the following:
Sub FirstTest ()
Dim b As Bookmark
Dim sName As String
For Each b In ActiveDocument.Bookmarks
sName = b.Name
Application.Run sName
Next b
End Sub
Sub SecondTest()
Beep
End Sub
If you run the FirstTest macro and have a bookmark in the activedocument
named "SecondTest" then the macro will beep. Notice that the value being
passed with Application.Run is string variable, not a bookmark. If you
dimension the variable to pass as a bookmark, then VBA will raise an error.
HTH
Quote:
> I have the name of a bookmark in the variable "b" which is dimensioned as
> bookmark. Is there a way I can call a subroutine which has the same name
as
> the bookmark whose name in "b"? My documentation talks about variants but
no
> pointers..
> --
> Bob Lohse