Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
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 |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
how do I copy several lines of word text into one excel cell? | New Users to Excel | |||
copy from Excel to word by macro with certain format | Excel Discussion (Misc queries) | |||
Embedding Word table in Excel cell | New Users to Excel | |||
Pasting Word table cell with paragraph markers into single Excel c | Excel Discussion (Misc queries) | |||
How can I copy Word data into a merged cell in Excel? | Excel Discussion (Misc queries) |