ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Use ADO to open a Word file from Excel? (https://www.excelbanter.com/excel-programming/454451-use-ado-open-word-file-excel.html)

RG III

Use ADO to open a Word file from Excel?
 
I need to create an Excel macro that opens any Word file, does a select all (Ctrl-A), copies all the selected text to the clipboard (Ctrl-C), and then closes Word. I think ADO functions can do this quickly and in a non-visible manner. Anyone know how to do this?

-Robert

GS[_6_]

Use ADO to open a Word file from Excel?
 
I need to create an Excel macro that opens any Word file, does a select all
(Ctrl-A), copies all the selected text to the clipboard (Ctrl-C), and then
closes Word. I think ADO functions can do this quickly and in a non-visible
manner. Anyone know how to do this?

-Robert


You could easily automate an 'instance' of Word and have it open the document
for you, all behind the scene since your Word instance will not be visible
until you make it so if giving your user interactive access to it. I don't use
Word much so you'll have to google for help automating it, but the same VBA
that works in Word will also work with your object ref to your Word instance in
Excel.

--
Garry

Free usenet access at http://www.eternal-september.org
Classic VB Users Regroup!
comp.lang.basic.visual.misc
microsoft.public.vb.general.discussion


All times are GMT +1. The time now is 09:08 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com