Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I am using VBA to open a word document from Excel, which is no problem
(Using the CreateObject method, Dim wrdApp As Word.Application, Di wrdDoc As Word.Document etc.) I would then like to search for a given string in the word document an then print the current page. Also, (But it's not that important.) I would then like to close th word doc and rename it so I know the file has been processed. Can anyone help me with the VBA code I should use to do this please? TIA Re -- Message posted from http://www.ExcelForum.com |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Open a document in Word, switch the macro recorder on and then search for something, File | Print + select current selection and then switch off macro recorder
The bulk of the code is now available in the VBE (Alt + F11). To make the code work from within Excel, prefix the Word objects with the name of the object that you are using (withing Excel) as an instance of Word. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
How can we scale Excel or Word to print and fit on 1 page? | Excel Discussion (Misc queries) | |||
PROBLEM:How to squeeze 2 Page sized Chart in Excel 2000 & embed in Word 2000 and print from Word to fit one page ??? | Excel Discussion (Misc queries) | |||
PROBLEM:How to squeeze 2 Page sized Chart in Excel 2000 & embed in Word 2000 and print from Word to fit one page ??? | New Users to Excel | |||
second page of word doc in excel wont print | Excel Discussion (Misc queries) | |||
Print more then one page in excel from a word object | Excel Worksheet Functions |