Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Excel / Programming / March 2008

Tip: Looking for answers? Try searching our database.

Cell to Cell Data Transfer

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
binar - 26 Mar 2008 16:51 GMT
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
JLGWhiz - 26 Mar 2008 17:11 GMT
Maybe this site will help.

http://www.microsoft.com/AtWork/getworkdone/timesaving.mspx

> Fellow Forum Members,
> I need to transfer data cell for cell from Excel into an existing table in
[quoted text clipped - 35 lines]
>  
> wdApp.Selection.PasteExcelTable False, False, Fals
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.