Hi,
I'm new at this. I would like to pause my Word97 macro and input the content for Name:=""

as in Name:="Albion2"

How can I re-write this please?

Someone suggested:

rng = InputBox "Please enter a range name"
.Add Range:=Selection.Range, Name:=rng

But that invokes the File/Save-as window? What I really need to to be able to pause and input the data in the bookmark window.

I know Word97 is oldish, but still very useful for what I do. I bought and have the 2000 CD, but never got around to installing it, would you believe.

John

Sub f12()
'
' f12 Macro
' Macro recorded 15/11/04 by jtjohnston
'
With ActiveDocument.Bookmarks
.Add Range:=Selection.Range, Name:="Albion2"
.DefaultSorting = wdSortByLocation
.ShowHidden = False
End With
End Sub

{I've also cross-posted [Sorry, bad for me to do] in microsoft.public. I'm not sure which is the appropriate newsgroup? Some have very little traffic too. Pertains to VBA or Macros? Both?!}

--
John Taylor-Johnston
-----------------------------------------------------------------------------
°v° Bibliography of Comparative Studies in Canadian, Québec and Foreign Literatures
/(_)\ Université de Sherbrooke
^ ^ http://compcanlit.ca/

Re: Newbie macor vba script by Helmut

Helmut
Mon Nov 15 14:18:48 CST 2004

Hi John,
looks like the beginners' group would be the right one for you.
Nevertheless,
select the text you want to apply a bookmark to and,
if you really must have the according dialog, then
Dialogs(wdDialogInsertBookmark).Show
---
There are still a lot of people, which like Word 97 best.
... and Jeff is right, of course, even asking must be learned.
---
Greetings from Bavaria, Germany
Helmut Weber, MVP
"red.sys" & chr(64) & "t-online.de"
Word XP, Win 98
http://word.mvps.org/


Re: Newbie macor vba script by Doug

Doug
Mon Nov 15 19:31:18 CST 2004

The following will open an input box into which you can enter the name of
the bookmark to be added and will then insert a bookmark with that name at
the location of the selection:

Dim bmname As String
bmname = InputBox("Enter the bookmark name", "Add Bookmark")
ActiveDocument.Bookmarks.Add bmname, Selection.Range


--
Please respond to the Newsgroup for the benefit of others who may be
interested. Questions sent directly to me will only be answered on a paid
consulting basis.

Hope this helps,
Doug Robbins - Word MVP
"John Taylor-Johnston" <taylorjo@collegesherbrooke.qc.ca> wrote in message
news:4198F446.93004598@collegesherbrooke.qc.ca...
> Hi,
> I'm new at this. I would like to pause my Word97 macro and input the
> content for Name:=""
>
> as in Name:="Albion2"
>
> How can I re-write this please?
>
> Someone suggested:
>
> rng = InputBox "Please enter a range name"
> .Add Range:=Selection.Range, Name:=rng
>
> But that invokes the File/Save-as window? What I really need to to be able
> to pause and input the data in the bookmark window.
>
> I know Word97 is oldish, but still very useful for what I do. I bought and
> have the 2000 CD, but never got around to installing it, would you
> believe.
>
> John
>
> Sub f12()
> '
> ' f12 Macro
> ' Macro recorded 15/11/04 by jtjohnston
> '
> With ActiveDocument.Bookmarks
> .Add Range:=Selection.Range, Name:="Albion2"
> .DefaultSorting = wdSortByLocation
> .ShowHidden = False
> End With
> End Sub
>
> {I've also cross-posted [Sorry, bad for me to do] in microsoft.public. I'm
> not sure which is the appropriate newsgroup? Some have very little traffic
> too. Pertains to VBA or Macros? Both?!}
>
> --
> John Taylor-Johnston
> -----------------------------------------------------------------------------
> °v° Bibliography of Comparative Studies in Canadian, Québec and Foreign
> Literatures
> /(_)\ Université de Sherbrooke
> ^ ^ http://compcanlit.ca/
>
>