Thread: [Solved] Issue in reading text
View Single Post
 
Old 10-16-2014, 07:41 AM
SurajJaldu SurajJaldu is offline Windows 7 64bit Office 2010 64bit
Novice
 
Join Date: Oct 2014
Location: Toronto
Posts: 1
SurajJaldu is on a distinguished road
Default Issue in reading text

Hi,

I am trying to read the text from the attached document. I am able to read all the text starting from 'Dear..'. I am unable to read the other text like 'CurrentDate, WorkerNumber, etc.' which is in Text boxes.

I tried with the following
1. DocObject.ActiveDocument.Content.Text
2. With DocObject
For p = 1 To .ActiveDocument.Paragraphs.Count
startRange = .ActiveDocument.Paragraphs(p).Range.Start
endRange = .ActiveDocument.Paragraphs(p).Range.End
Set tRange = .ActiveDocument.Range(startRange, endRange)
Msgbox tRange.Text
Next
.Close 'close the document
End With

Is there a way to read text from text boxes. I wanted to read the entire text content from the document.

Thanks,
Suraj
Attached Files
File Type: docx Sample.docx (54.4 KB, 8 views)
Reply With Quote