Source data extract from OLEobject in Excel with VBA


Dear Exprts,

I need to import some word files with (embedded excel) charts into excel and then extract the source data (paste it in excel). I have been able to do the 1st part. But I haven't been able to extract the source data from the word file. I recorded a Macro but it only pastes data from the clip board and not from the source data. Any help here is highly appreciated. Thanks heaps - Raj

But the following code for extract and pasting data is not working.

ActiveSheet.OLEObjects("Object 1").Verb xlPrimary

Application.CutCopyMode = False


I suggest you do this the other way around. Open the source document in Word, load an instance of the Excel application and paste the table from Word into the Excel sheet.
Variatus (rep: 803) Apr 19, '17 at 6:38 am
Thanks for your suggestion Variatus. Wondering if you have any code in these lines that I can refer to/use. Highly appreciate your help! Cheers
heg_raj Apr 19, '17 at 7:17 am
You might google for something like "VBA open Excel workbook from Word". With that, or similar, you should find plenty of code to start you off. Ron de Bruin, Contextures or C.Pearson are reliable names, if you come across them in your search.
Variatus (rep: 803) Apr 19, '17 at 7:59 am
Add to Discussion

Answer the Question

You must create an account to use the forum. Create an Account or Login