Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
VBA excel paste to word deleting itself
Hey guys
I've tried pasting cells to word both using wrddoc.content.paste and wrddoc.content.pasteexceltable false false false and I'm doing something wrong after that because I can't seem to inser a page break, text or anything after that without delete the data. I'd appreciate some help! Ok, that wasn't exactly descrictive, sorry guys. I'm trying to cut and paste some cells from excel to word, insert page break and repeat the process on a new page. Does anyone know how to get this done? Thanks!!! (Nigel, kkknei, Bob, and Juan, thanks for your help earlier -- Message posted from http://www.ExcelForum.com |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
VBA excel paste to word deleting itself
Hi, Skyron. You didn't post any code, but from your description and my
experiences (as a head-scratcher trying to figure out what I'm doing!), it sounds like you're not moving the Selection off what you have just pasted into Word. If it's still selected in Word, then the next thing you try to insert or paste will replace your selection. Without seeing the code, it's hard to recommend anything, but off the top of my head I'd suggest a Selection.Collapse wdCollapseEnd, which will collapse the selection in Word (note the "wd") to the end. HTH Ed "Skyron " wrote in message ... Hey guys I've tried pasting cells to word both using wrddoc.content.paste and wrddoc.content.pasteexceltable false false false and I'm doing something wrong after that because I can't seem to insert a page break, text or anything after that without delete the data. I'd appreciate some help! Ok, that wasn't exactly descrictive, sorry guys. I'm trying to cut and paste some cells from excel to word, insert a page break and repeat the process on a new page. Does anyone know how to get this done? Thanks!!! (Nigel, kkknei, Bob, and Juan, thanks for your help earlier) --- Message posted from http://www.ExcelForum.com/ |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
VBA excel paste to word deleting itself
Help on word syntax/objects would probably be best asked in a word newgroup.
An alternative is to go to word and turn on the macro recorder while you take the action manually. -- Regards, Tom Ogilvy "Skyron " wrote in message ... Hey guys I've tried pasting cells to word both using wrddoc.content.paste and wrddoc.content.pasteexceltable false false false and I'm doing something wrong after that because I can't seem to insert a page break, text or anything after that without delete the data. I'd appreciate some help! Ok, that wasn't exactly descrictive, sorry guys. I'm trying to cut and paste some cells from excel to word, insert a page break and repeat the process on a new page. Does anyone know how to get this done? Thanks!!! (Nigel, kkknei, Bob, and Juan, thanks for your help earlier) --- Message posted from http://www.ExcelForum.com/ |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
VBA excel paste to word deleting itself
I tried the line of code you suggested.
Selection.Collapse wdCollapseEnd Gave me an error that the "Object doesn't support this property o method" Then tried both wrdApp.Selection.Collapse wdCollapseEnd Word.selection.Collapse wdCollapseEnd and still just overwriting the last paste when I go back through Here's the code I'm trying to get to work. Any help will be appreciated with beer if I can :) With wrdDoc 'Write Data Sheets("Sheet2").Select For iWrd = 0 To Finali - 1 iFirstRow = iWrd * 28 iLastRow = (iWrd * 28) + 27 If iFirstRow = 0 Then iFirstRow = 1 End If Range("A" & iFirstRow & ":B" & iLastRow).Select Selection.Copy .Content.PasteExcelTable False, False, False .Content.InsertBreak Next iWr -- Message posted from http://www.ExcelForum.com |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Excel to Word : Paste specialPaste Link Excel Chart Obj doesn't | Charts and Charting in Excel | |||
Excel 7, paste linked to word becomes black when word pdf'd | Excel Discussion (Misc queries) | |||
cannot paste in Excel or word. | Excel Discussion (Misc queries) | |||
PASTE LINK option not available when I select PASTE SPECIAL to link an image in Excel to a Word document. | Links and Linking in Excel | |||
deleting phrases in Excel and/or Word | New Users to Excel |