PDA

View Full Version : Move data from world to excel



sameer.sh
01-23-2012, 03:04 PM
Dear All,

I have so much word file it include form has data such as date , name of sheet ...
My qution any one have a solution to move or copy this data to cell in excel
one sheet
please help me !!!!

Sebastian H
01-23-2012, 03:16 PM
This is such a general question that we could spend days answering it. If you google for your question, you will get over 10 million results. Have you tried any of these? If yes, and they didn't work for you, what is it that you need differently?

sameer.sh
01-23-2012, 03:56 PM
I need macro program reed directliy from table in the word to excel cell
"i have table in the word in the first cell include sameer.
I want go to excel and make macro program reed this cell from word to A1 in excel .

Thanks for responce

Sebastian H
01-23-2012, 06:59 PM
Let me google that for you (http://lmgtfy.com/?q=%22word+to+excel%22+VBA+solved). This gives hundreds of results, including 211 in our forum. Do any of these work for you?

farrukh
01-25-2012, 12:49 AM
Hi Sameer,

Hope this help you to get the word files data to excel file sheet1.

Option Explicit
Sub GetDataFromWordDoc()
Dim sPath As String
Dim sFile As String
Dim MyWd As Object
sPath = "D:\test1\" 'Change path where all the .docx files exist in a folder
sFile = Dir(sPath & "*.docx")
Do While sFile <> ""
Set MyWd = GetObject(sPath & sFile)
MyWd.ActiveWindow.Selection.WholeStory
MyWd.ActiveWindow.Selection.Copy
Sheets("Sheet1").Cells.SpecialCells(xlCellTypeLastCell). _
Offset(1, 1).End(xlToLeft).PasteSpecial xlPasteValues
sFile = Dir
Loop
Set MyWd = Nothing
End Sub



Thanks and Regards,
Farrukh

farrukh
01-30-2012, 04:54 AM
Sameer.Sh,

If you are satisfied from the answer please go to Thread Tools last option marked as solved.

Thanks
Farrukh