Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1
Default copy excel cell to cell in word table using excel macro

I have a macro in excel that copies a cell, opens a word document, moves the
cursor to a specific location, then pastes what was copied. After that it
goes to a new location in the word document (which is in a table), goes back
to the excel spreadsheet which is still active, copies a new cell then
returns to the word document to paste that. So far I have tried numerous
coding to get the data to paste but it hasn't happened. Can someone please
tell me what I am doing wrong?
Here is the code:

Range("A1").Select
Selection.Copy
Set wrdApp = CreateObject("Word.Application")
Set wrdDoc = wrdApp.Documents.Open("Mydoc.doc")
wrdApp.Visible = True
wrdApp.Selection.MoveDown Unit:=wdLine, Count:=2
wrdApp.Selection.MoveRight Unit:=wdCharacter, Count:=45Windows
wrdApp.Selection.PasteAndFormat (wdPasteDefault)
wrdApp.Selection.MoveUp Unit:=wdLine, Count:=9
Windows("Myexcel").Activate
Range("A4").Select
Selection.Copy
wrdApp.Selection.PasteExcelTable False, False, False
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
how do I copy several lines of word text into one excel cell? jhh New Users to Excel 2 June 16th 06 11:18 PM
copy from Excel to word by macro with certain format wmax77 Excel Discussion (Misc queries) 0 February 9th 06 11:07 AM
Embedding Word table in Excel cell Larry Lester New Users to Excel 3 October 24th 05 05:05 PM
Pasting Word table cell with paragraph markers into single Excel c Steve Excel Discussion (Misc queries) 1 June 16th 05 11:26 PM
How can I copy Word data into a merged cell in Excel? Suzan Wild Excel Discussion (Misc queries) 1 June 1st 05 10:04 PM


All times are GMT +1. The time now is 06:55 AM.

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"