> Second question, sorry to be cheeky.
>
> Whats the line of code to assign the first row of a page or first row
> of a document to a variable?

Signature
Salut!
_______________________________________
Jean-Guy Marcil - Word MVP
jmarcilREMOVE@CAPSsympatico.caTHISTOO
Word MVP site: http://www.word.mvps.org
Hi,
The code to select the first line on the current page will do. The first
line is always the heading (though not always formatted as a heading). I'm
wanting to grab this text to assign to a variable.
( I will then be using the variable as the new document name when i 'save
as').
Thanks for your help, I really do appreciate it.
> Santa Claus was telling us:
> Santa Claus nous racontait que :
[quoted text clipped - 10 lines]
> How would you determine the page?
> What are you trying to do?
Santa Claus - 03 Oct 2005 21:58 GMT
I should have mentioned that the cursor would be on the current page that i
would be working with.
> Hi,
>
[quoted text clipped - 21 lines]
>> How would you determine the page?
>> What are you trying to do?
Jean-Guy Marcil - 05 Oct 2005 02:20 GMT
Santa Claus was telling us:
Santa Claus nous racontait que :
> Hi,
>
[quoted text clipped - 4 lines]
> ( I will then be using the variable as the new document name when i
> 'save as').
Try this:
Dim ParaRange As Range
Dim StartRange As Range
Dim LineStr As String
Set StartRange = Selection.Range
Set ParaRange = ActiveDocument.Bookmarks("\Page").Range.Paragraphs(1).Range
ParaRange.Select
ParaRange.Collapse wdCollapseStart
LineStr = ActiveDocument.Bookmarks("\Line").Range.Text
MsgBox LineStr
StartRange.Select

Signature
Salut!
_______________________________________
Jean-Guy Marcil - Word MVP
jmarcilREMOVE@CAPSsympatico.caTHISTOO
Word MVP site: http://www.word.mvps.org