Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
need to read data from microsoft word based forms
#1
Solved: 11 Years, 3 Months, 2 Weeks ago
the application that we are trying to automate reads data from microsoft based word forms.

i have attached a sample form here. I found that QTP is not able to recognise the different fields on these forms and hence is unable to capture data.

can someone suggest a way so that QTP can recognise the fields that are given in the word document?


Attached Files
.doc   read2.doc (Size: 142 KB / Downloads: 99)
Reply
#2
Solved: 11 Years, 3 Months, 2 Weeks ago
Hi

Do you want to read or retrieve each word in ms word document?

Please paste the code that you tried

- Mr.K
Reply
#3
Solved: 11 Years, 3 Months, 2 Weeks ago
We want to develop a script that would read data from an old form and populate it into a new form.
The boxes shown in the form are different fields and would contain diff. values. We basically wanna pick up those field-values and save them in a new form.
We haven't started off yet because QTP is unable to recognise the fields and so we are stuck at the very first step.
Reply
#4
Solved: 11 Years, 3 Months, 2 Weeks ago
Hi vinay,

Try this script its for read the data from word.....................


Code:
set a=CreateObject("Word.Application")

set b=a.Documents.Open("c:\read2.doc")

p_count=b.Paragraphs.Count

msgbox p_count

for c=1 to p_count

str_range=b.Paragraphs(c).Range.Start

end_range=b.Paragraphs(c).Range.End

Set s_range=b.Range(str_range,end_range)

x_str=s_range.Text

if len(x_str)=1 then

msgbox "false"

else

msgbox x_str

end if

next

a.Quit

set a=nothing

set b=nothing
Reply
#5
Solved: 11 Years, 3 Months, 2 Weeks ago
Hi pvinay,

Did you got exact code to get Row & Column data from MS-Word file/Form, if so then please send the code. I have a need of it.

Thanks in advance. (i will be really grateful to you if you can send the code for it)
Shrinivas
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  UFT Fails to Open Microsoft Word teekay99 0 734 10-24-2019, 07:37 PM
Last Post: teekay99
  UFT 14.0 is unable to Identify Oracle forms. krr 0 3,497 06-12-2017, 06:24 PM
Last Post: krr
  UFT 12 hangs on a line (.NET forms) sara- 0 2,539 10-22-2014, 03:51 PM
Last Post: sara-
  Header and Footer in word doc anupam4j 0 2,505 10-10-2014, 01:26 PM
Last Post: anupam4j
  Does QTP/UFT support "Microsoft.Windows.Control" (one type of wpf control)? abhishikth12221 2 3,975 01-22-2014, 06:24 PM
Last Post: abhishikth12221

Forum Jump:


Users browsing this thread: 1 Guest(s)