Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 35
Default using excel cells to be inserted into Ms.Word fill-in fileds

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   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 8,520
Default using excel cells to be inserted into Ms.Word fill-in fileds

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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
excel inserted in word document junvir Excel Discussion (Misc queries) 0 April 6th 10 05:17 AM
how do I add a solid color fill to a photo inserted into excel Butch Walker[_2_] Excel Worksheet Functions 0 January 20th 08 01:18 AM
Need help to open Word doc inserted into Excel sheet from outside the network. User Excel Discussion (Misc queries) 1 May 7th 07 05:03 PM
Automatically fill one cell in any newly inserted row spoko Excel Discussion (Misc queries) 1 November 11th 05 06:45 PM
Excel inserted 0's in cells linked to blank cells lburg801 Excel Discussion (Misc queries) 5 October 28th 05 11:32 PM


All times are GMT +1. The time now is 10:11 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"