Aug 15, 2002 #1 monak MIS Jul 2, 2002 22 US I am trying to find equivalent so I can take lines from my ActiveDocument object and make a series of string comparisons?
I am trying to find equivalent so I can take lines from my ActiveDocument object and make a series of string comparisons?
Aug 17, 2002 #2 JustinEzequiel Programmer Jul 30, 2001 1,192 PH if by 'lines' you mean paragraphs then you could use something like this [tt]Dim oPara As Word.Paragraph Set oPara = ActiveDocument.Paragraphs(3) ' get third paragraph Debug.Print Left$(oPara.Range.Text, Len(oPara.Range.Text) - 1) Set oPara = Nothing Set oPara = ActiveDocument.Paragraphs(7) ' get seventh paragraph Debug.Print Left$(oPara.Range.Text, Len(oPara.Range.Text) - 1) Set oPara = Nothing[/tt] Upvote 0 Downvote
if by 'lines' you mean paragraphs then you could use something like this [tt]Dim oPara As Word.Paragraph Set oPara = ActiveDocument.Paragraphs(3) ' get third paragraph Debug.Print Left$(oPara.Range.Text, Len(oPara.Range.Text) - 1) Set oPara = Nothing Set oPara = ActiveDocument.Paragraphs(7) ' get seventh paragraph Debug.Print Left$(oPara.Range.Text, Len(oPara.Range.Text) - 1) Set oPara = Nothing[/tt]