J
Jim Burke in Novi
I am opening a word document and finding 'cc:' in it. I have that working
fine. I need to count the number of lines including and after the line where
'cc:' is found. the cc: list is always at the very end, and each name goes on
a separate line. I can't quite figure out how to do this - this is my first
attempt at using word within Access, so I'm a newbie! Any help is
appreciated. Here's what I have to find 'cc:' and what I was trying to do to
count the lines (it just keeps looping inside the while loop) :
Set objWord = New Word.Application
objWord.Documents.Add "filename"
Set myRange = objWord.ActiveDocument.Content
myRange.Find.Execute "Cc:", True, , , , , True
ccCount = 0
If myRange.Find.Found Then
While Not myRange.End
ccCount = ccCount + 1
Selection.MoveDown wdLine, 1
Wend
End If
objWord.ActiveDocument.Close
objWord.Quit
fine. I need to count the number of lines including and after the line where
'cc:' is found. the cc: list is always at the very end, and each name goes on
a separate line. I can't quite figure out how to do this - this is my first
attempt at using word within Access, so I'm a newbie! Any help is
appreciated. Here's what I have to find 'cc:' and what I was trying to do to
count the lines (it just keeps looping inside the while loop) :
Set objWord = New Word.Application
objWord.Documents.Add "filename"
Set myRange = objWord.ActiveDocument.Content
myRange.Find.Execute "Cc:", True, , , , , True
ccCount = 0
If myRange.Find.Found Then
While Not myRange.End
ccCount = ccCount + 1
Selection.MoveDown wdLine, 1
Wend
End If
objWord.ActiveDocument.Close
objWord.Quit