Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Is there any way to write a macro that will open an existing word document
and insert certain fields from my spreadsheet automatically when specific text is typed into a specific field? In depth/personal replies are greatly appreciated, and can be sent to kdt AT chainstarusa DOT com thanks kat |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
kat,
You need to look in Automation, the means by which you can control one application from another. e.g. Dim MyWord as Word.Application Set MyWord=New Word.Application MyWord.Documents.Add .... etc (but I don't know the Word Object Model) The easist way to start is record a macro in Word, so you can see what you need achieve, then transfer this code to Excel, changing the references to allow for the fact that the code is now in Excel (i.e. so all calls go through the MyWord, or related, object). Make sure you .Quit Word and set all object to Nothing, otherwise you will trouble getting rid of the instances that you create. Google for "Office Automation", or use that old fashion reference, Your Local Library. Nick "Kat" wrote in message ... Is there any way to write a macro that will open an existing word document and insert certain fields from my spreadsheet automatically when specific text is typed into a specific field? In depth/personal replies are greatly appreciated, and can be sent to kdt AT chainstarusa DOT com thanks kat |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Missing programs after downloading open office | Setting up and Configuration of Excel | |||
Change default document path for all programs in Office Suite? | Excel Discussion (Misc queries) | |||
Office 2007 Macros | Excel Worksheet Functions | |||
Excel Programs developed in Office 2000 on Windows 2000 | Excel Discussion (Misc queries) | |||
Microsoft Office Macros | Excel Programming |