Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Hello,
I'm trying to create a macro that would use data from an excel sheet and insert it into microsoft word document that has specific "fill-in Fields" that are scattered through out the document. I tried using record macro while filling in a "fill-in field" however the macro didn't record what I have typed in the prompt window. any help is appreciated |
#2
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Hi Abdul
Identify the word table index and the row/column (x,y mentioned in the code) of the cell within the table which is the fill-in field. I am assuming it is the first table so the index is given as 1 in the below code. Dim wrdApp As object,wrdDoc As Object Set wrdApp = CreateObject("Word.Application") Set wrdDoc = wrdApp.Documents.Open("c:\filename.doc) wrdApp.Visible = False wrdDoc.Tables(1).Cell(x,y).Range.Text = ActiveSheet.Range("A1") wrdDoc.Close True Set wrdDoc = Nothing Set wrdApp = Nothing -- Jacob (MVP - Excel) "Abdul" wrote: Hello, I'm trying to create a macro that would use data from an excel sheet and insert it into microsoft word document that has specific "fill-in Fields" that are scattered through out the document. I tried using record macro while filling in a "fill-in field" however the macro didn't record what I have typed in the prompt window. any help is appreciated |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
excel inserted in word document | Excel Discussion (Misc queries) | |||
how do I add a solid color fill to a photo inserted into excel | Excel Worksheet Functions | |||
Need help to open Word doc inserted into Excel sheet from outside the network. | Excel Discussion (Misc queries) | |||
Automatically fill one cell in any newly inserted row | Excel Discussion (Misc queries) | |||
Excel inserted 0's in cells linked to blank cells | Excel Discussion (Misc queries) |