Sub CopyTextFromWord()
Dim wApp As Word.Application
Set wApp = New Word.Application
wApp.Visible = True
wApp.Activate
wApp.Documents.Open "YourFilePath\SampleWord.docx"
wApp.Selection.WholeStory
wApp.Selection.Copy
Range("A1").Activate
ActiveSheet.Paste
End Sub
5 comments:
hi rajan
if i run this --error appears as user difined type is not difined ( Dim wApp As Word.Application)
thanks
Add the reference before run this Macro :
MicroSoft Word 12.0 Object Library
Thanks..!
It was very useful
Wow... thank you so much...
sir please help me.
this code is not working for me
it is showing error as userdefined type is not defined
and if i include this line
MicroSoft Word 12.0 Object Library
that is too showing error
expected end of statement
sir please tell me how to add reference with full code.
expecting soon...
thanks in advance
Post a Comment