Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 24
Default Cell to Cell Data Transfer

Fellow Forum Members,
I need to transfer data cell for cell from Excel into an existing table in
Word 2003. The table in Word utilizes headers. The problem I am encountering
is that the code does not recognize the headers and is not transfering the
data cell to cell. Can anyone out there help me out with some coding that
will accomplish this task? Any help will be greatly appreciated.

Below is the code I would like to modify to accomplish the task of
transfering data from Excel to Word table. If there is a better code out
there please let me know. Thanks.

It will open a word document named test.doc it will then select the bookmark
named test. It will then copy the range A1:E401 from the active workbook to
the word document at the point in the document where the test bookmark occurs.


VB: AutoLinked keywords will cause extra spaces before keywords. Extra
spacing is NOT transferred when copy/pasting, but IS if the keyword uses
"quotes".
Dim wdApp As Object
Dim wd As Object
Dim oIshp As Object


On Error Resume Next
Set wdApp = GetObject(, "Word.Application")
If Err.Number < 0 Then
Set wdApp = CreateObject("Word.Application")
End If
On Error Goto 0

Set wd = wdApp.Documents.Open("C:\test.doc")

wdApp.Visible = True

Range("A1:E401").Copy

wd.Bookmarks("test").Select

wdApp.Selection.PasteExcelTable False, False, Fals
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,986
Default Cell to Cell Data Transfer

Maybe this site will help.

http://www.microsoft.com/AtWork/getw...imesaving.mspx

"binar" wrote:

Fellow Forum Members,
I need to transfer data cell for cell from Excel into an existing table in
Word 2003. The table in Word utilizes headers. The problem I am encountering
is that the code does not recognize the headers and is not transfering the
data cell to cell. Can anyone out there help me out with some coding that
will accomplish this task? Any help will be greatly appreciated.

Below is the code I would like to modify to accomplish the task of
transfering data from Excel to Word table. If there is a better code out
there please let me know. Thanks.

It will open a word document named test.doc it will then select the bookmark
named test. It will then copy the range A1:E401 from the active workbook to
the word document at the point in the document where the test bookmark occurs.


VB: AutoLinked keywords will cause extra spaces before keywords. Extra
spacing is NOT transferred when copy/pasting, but IS if the keyword uses
"quotes".
Dim wdApp As Object
Dim wd As Object
Dim oIshp As Object


On Error Resume Next
Set wdApp = GetObject(, "Word.Application")
If Err.Number < 0 Then
Set wdApp = CreateObject("Word.Application")
End If
On Error Goto 0

Set wd = wdApp.Documents.Open("C:\test.doc")

wdApp.Visible = True

Range("A1:E401").Copy

wd.Bookmarks("test").Select

wdApp.Selection.PasteExcelTable False, False, Fals

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
Transfer data from a cell to another workbook if certain criteria breezy Excel Worksheet Functions 15 January 11th 12 07:45 AM
transfer data cell from another work sheet MDAM Excel Worksheet Functions 2 November 13th 08 04:12 AM
How do i transfer cell data from one sheet to the other in Excel Robin New Users to Excel 4 April 6th 07 08:02 AM
Transfer cell data from one worksheet to another === URGENT rajesh Excel Discussion (Misc queries) 1 December 5th 05 02:40 PM
Can data from one ws transfer to another IF cell has text? Ccp Excel Worksheet Functions 3 July 15th 05 04:14 AM


All times are GMT +1. The time now is 05:39 PM.

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

About Us

"It's about Microsoft Excel"