Need to create a Excel Macro to import text from Word to Excel
Hi Everyone,
I need your help in creating a macro that should copy a text from word document and paste that into excel document.
I'm attaching a word and excel document. If you see the word document, there will be a table. If the content of the second column is "Casual Visit" then it should take its corresponding value (i.e $15) and paste that into the excel document (in the cell I2). Is it possible to handle this. Please help me as i'm very new to macro. Thanks in advacne
I'm getting an error "Run-time error 91 : object variable or with block variable not set" on the line "Set rng = wdApp.ActiveDocument.Content"
Please help me in overcoming the error i'm facing. Also i want to know if that code is a right approach for my requirement . Please help me as this is very important to me.
The above line searches for particular word(TextToFind) and assigning the next row's content into "The Content" variable. Can you please tell me what to do in case i want to assign the next word of the "TextToFind".
For example consider i'm having some line as Casual Visit $5000
In this case i'm searching for "Casual visit" and once i find the casual visit i should assign $5000 to "The Content" variable.
Bookmarks