Hi,
I am trying to automate Copying all of a word doc to an excel sheet.
Also, how do you check if word doc is open already and close it.
I know you;d probably use a for ..next loop.
Sub copy_word_2_xl()
Dim WordApp As Object
'Open Word
Set WordApp = CreateObject("Word.application")
WordApp.Visible = True
WordApp.Documents.Open Filename:="S:\Word\LECTURE.doc", ReadOnly:=False
'Refer to the WordApp objct to write to word from excel
activedocument.COPY
Workbooks("Course").Activate
Sheets("Remedy_copyhere").[a1].Select
ActiveSheet.Paste
'Close Word
'WordApp.Quit
'Set WordApp = Nothing
End Sub
I am trying to automate Copying all of a word doc to an excel sheet.
Also, how do you check if word doc is open already and close it.
I know you;d probably use a for ..next loop.
Sub copy_word_2_xl()
Dim WordApp As Object
'Open Word
Set WordApp = CreateObject("Word.application")
WordApp.Visible = True
WordApp.Documents.Open Filename:="S:\Word\LECTURE.doc", ReadOnly:=False
'Refer to the WordApp objct to write to word from excel
activedocument.COPY
Workbooks("Course").Activate
Sheets("Remedy_copyhere").[a1].Select
ActiveSheet.Paste
'Close Word
'WordApp.Quit
'Set WordApp = Nothing
End Sub