readind data from word tables to excel

  • Thread starter Thread starter vijaya sekhar vasa
  • Start date Start date
V

vijaya sekhar vasa

helo,

Is there a method to write a macro that reads the word tables and send
the values like "yes" or "no" to excel.And after that I would like to
create the chart automatically? IS that possible to do it trough
macros in excel.Can anyone give me some good technical advice, I will be
thankfull to you all.

regards,
vasa
 
Hi Vasa

This will activate Word from Excel (or another Office App)

On Error Resume Next
Set ObjWd = GetObject(, "Word.Application")
If Not TypeName(ObjWd) = "Nothing" Then
' Word Running
Else
' Word Not Running
Set ObjWd = CreateObject("Word.Application")
End If
ObjWd.Visible = True
ObjWd.Activate
On Error GoTo 0

You'll then need to set a an object variable to your Word Document, then the
Table that you need to interrogate.
If you set a Reference in the VBE Project to the Word object model, coding
will be easier.
 
helo,

I want to open not one word file(and that word file contains 5 or 6
tables, and in cells sometimes some form elements are there)but some
unknown number of doc files in a folder.So I have to check some given
cells and columsn with checkboxes but not all,pLease give me some more
tips,

regards,
vasa
 
Vasa,
Apologies for the misunderstanding. You'll need to loop though the files in
the folder. Check out VBA Help for 'Dir'. You'll probably want to ensure
that all Word files in the folder are of the type that your code needs to
examine.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top