Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Import a Word DOC. into Excel

Status
Not open for further replies.

Guest_imported

New member
Jan 1, 1970
0
How do you import a word doc. into excel???
I tried what Microsoft's website said and it didn't work.
I also tried to save it as a text file and HTML and it didn't work.

Please help!!!!

Thanks,
Tim
 
I've gotta ask.....Why ???

Well, Word objects, properties and methods just like any other office application. Do you want pieces of the document (Paragraph, Sentance, Word) or the whole thing ???

Is there a particular table you need the data from ??? Tyrone Lumley
augerinn@gte.net
 
I've gotta ask.....Why ???

Well, Word has objects, properties and methods just like any other office application. Do you want pieces of the document (Paragraph, Sentance, Word) or the whole thing ???

Is there a particular table you need the data from ??? Tyrone Lumley
augerinn@gte.net
 
The reason why is because the President of my company has a large table in word (about 110 pages). She has been complaining about working with the file because Word runs really slow with this table open. I figured that Excel would handle the size of the table better since it is made for bigger spreadsheets. I just want to try anything to get her off my back. I told her to just start a new file but she is too picky for that.
The DOC. is one big table and I need the whole thing moved over to Excel.

any ideas?

Thanks,
Tim
 
OH by the way.......Its not running slow because of the hardware.......It is a Pentium 4 1.5GHz Box with 256MB RAM
 
OK, cool, so your trying to get to the table right??
----------------------------
Easy way. One time, manual.

Highlight all the cells. Copy. Start Excel. Paste
---------------------------------------------------
Hard Way, Programatically. (If you'll be doing this on a regular basis)

The table is an object in word. It has rows and columns and properties.

You can get all the cells in the table like this:

Set oTable = ActiveDocument.Tables(1)
For Each aCell In oTable.Rows(1).Cells
Set myRange = aCell.Range
myRange.MoveEnd Unit:=wdCharacter, Count:=-1
MsgBox myRange.Text
Next aCell

Just expand on that, looping thorugh each row.
For i = 1 to activedocument.Tables(1).rows.count
'code above...
Next i

Then, instanciate an excel object and start shoving stuff into it.

Dim objexcel As Excel.Application
Set objexcel = New Excel.Application
With objexcel
.Visible = False 'Hide the workbook
.Workbooks.Add
.ScreenUpdating = False ' No screen update, speeds up processing
.Application.Calculation = xlManual ' Manula calculate,speeds up processing
.cells(x,y).value = myrange.txt
End With

You'll have to combine the three examples given above into one big workable piece of code.... Tyrone Lumley
augerinn@gte.net
 
I tried the copy and paste already..didn't work. Word stops responing everytime I try it.
I dont do this all the time this will be a one time thing hopefully.
I would try to do the programing but i dont know how or where to go to do it..

Tim
 
I tried the copy and paste already..didn't work. Word stops responing everytime I try it.
I dont do this all the time this will be a one time thing hopefully.
I would try to do the programing but i dont know how or where to go to do it..
I try to stay away from Ofice Apps as much as possible
Now i wish i knew more

Tim
 
Maybe its because the Word table is so big. Try copying a smaller section of the table and see if that works. Then copy one section at a time.
 
Is your word document a table? If it is, then you should cut and paste it as you would within word. If you want to link it in Excel, then when pasting in Excel, select "Paste Special", then select "Paste Link". You can do the same from Excel to Word. Hope this helps.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top