PDA

Click to See Complete Forum and Search --> : Embedded Objects in Excel


Lonely
Dec 15th, 2003, 06:48 AM
Hi All,
I wish to search all occurences of the word "Thomas" and replace them with "XXX" in all worksheets of an excel file. I have been successful in writing the code for this.

However, I have noticed that my excel workbook may have numerous embedded word documents where the word "Thomas" may occur.

Please can someone help me write the code which can go into these embedded word documents and do the search/replace.

Any useful leads will also be appreciated.
thanks,
Lonely

Lonely
Dec 18th, 2003, 06:00 AM
Hi All,
I have been able to write some code that will perform the above mentioned problem. I have attached the excel file herewith.

The code for the Word documents works fine except for that it does not start with the start of the document. I am not able to include the code which will send the cursor to the stsrting ofr the document.

In the case of Excel code, I have been able to open the activate the Excel object however, the Search/Replacement code does not run.

I have attached the excel sheet herewith which has the Macros and the sample embedded documents.

Does someone have any ideas
Thanks,
Lonely

Lonely
Dec 18th, 2003, 06:13 AM
The attachment