Yes,
Thanks!!
But how ,specificaly, would I add a bookmark on say Page 5
that starts say at character 180 and goes to 200?
>-----Original Message-----
>Wow! A bookmark that ALREADY contains the current page?!? I wish I had
[quoted text clipped - 4 lines]
>
>"Christian Freßdorf" <ungueltig@nurfuerspam.de> wrote in
message
>news:1t08ein36lh86.dlg@zaphod-systems.de...
>> Hi Jack,
[quoted text clipped - 8 lines]
>
>.
Jean-Guy Marcil - 08 Dec 2004 20:26 GMT
Jack was telling us:
Jack nous racontait que :
> Yes,
> Thanks!!
>
> But how ,specificaly, would I add a bookmark on say Page 5
> that starts say at character 180 and goes to 200?
Do you mean (1) the 180th charcter in the document (Which happens to be on
page 5) or (2) the 180th character on page 5?
(1)
'_______________________________________
Sub DocBookMark()
Dim MyRange As Range
With ActiveDocument
Set MyRange = .Range(Start:=.Characters(180).Start, _
End:=.Characters(200).End)
.Bookmarks.Add Name:="Test", Range:=MyRange
End With
End Sub
'_______________________________________
or
(2)
'_______________________________________
Sub PageBookMark()
Dim MyRange As Range
Dim CurrentRange As Range
'To save user selection
Set CurrentRange = Selection.Range
Selection.GoTo wdGoToPage, wdGoToAbsolute, 5
Set MyRange = Selection.Bookmarks("\page").Range
With MyRange
If .Characters.Count > 198 Then
.MoveEnd wdCharacter, 199 - .Characters.Count
.MoveStart wdCharacter, 179
.Bookmarks.Add Name:="Test", Range:=MyRange
Else
MsgBox "Too few charcters on target page to " _
& "create bookmark.", vbExclamation, "Cancelled"
End If
End With
'Replace user original selection
CurrentRange.Select
End Sub
'_______________________________________

Signature
Salut!
_______________________________________
Jean-Guy Marcil - Word MVP
jmarcilREMOVE@CAPSsympatico.caTHISTOO
Word MVP site: http://www.word.mvps.org
Christian =?iso-8859-1?Q?Fre=DFdorf?= - 10 Dec 2004 06:54 GMT
Hi Jack,
> But how ,specificaly, would I add a bookmark on say Page 5
> that starts say at character 180 and goes to 200?
ok, take the complete page 5 into a range and adjust the range starting and
ending values. Add a bookmark to this reduced range:
Sub Test()
Dim rng As Range
Selection.GoTo What:=wdGoToPage, Which:=wdGoToAbsolute, _
Count:=5
Set rng = Selection.Bookmarks("\Page").Range
rng.SetRange 180, 200
rng.Select
ActiveDocument.Bookmarks.Add "MyTest", rng
End Sub
HTH

Signature
regards Christian
~~~~~~~~~~~~~~~~
reply only to this newsgroup
http://www.mvps.org/word/FindHelp/Posting.htm
http://support.microsoft.com/default.aspx?scid=fh;DE;NGNetikette
Renjith - 10 Dec 2004 07:45 GMT
Hi there,
I have tried this. It is capturing the whole page, but the problem is that
if my document contains a Section Break towards the end of the page, then it
becomes a Page Break. how can I solve this probelm?
Also I would like to get the font type and size of the Bullets in a
particular doc file.
Thanks and Regards,
Renjith R Nair
"Christian Freßdorf" wrote:
> Hi Jack,
>
[quoted text clipped - 15 lines]
>
> HTH