tags:

views:

326

answers:

2

Can anyone tell me how to read values from a word.doc file using VBScript. I had given a sample.doc file below.

Parameters              Default Values
-----------------------------------------------------
No of values            8192 
Sampling Frequency      12800
Frequency Hop           2000
No of times             2

The above one is given in a table.

A: 

Here are some notes.

Set wd = CreateObject("Word.Application")
wd.Visible = True

wd.Documents.Open "C:\Docs\Tables.doc"

For Each t In wd.ActiveDocument.Tables
    s = s & "Table" & vbcrlf
    For i = 1 To t.Rows.Count
        For Each c In t.Rows(i).Cells
            s = s & Replace(c.Range.Text, vbCr & Chr(7), "")
        Next
        s = s & vbcrlf
    Next
Next

MsgBox s
Remou
Thanks a lot tester.This is indeed very helpfull
+1  A: 

These Links should help
Word object model

Document Class

Tester101