A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Excel » General Discussion
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

using excel cells to be inserted into Ms.Word fill-in fileds



 
 
Thread Tools Display Modes
  #1  
Old May 14th, 2010, 08:32 AM posted to microsoft.public.excel.misc
abdul
external usenet poster
 
Posts: 6
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  
Old May 14th, 2010, 10:00 AM posted to microsoft.public.excel.misc
Jacob Skaria
external usenet poster
 
Posts: 5,952
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

 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 12:38 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.