Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 118
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default 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
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
Excel to Word : Paste specialPaste Link Excel Chart Obj doesn't Makedon Charts and Charting in Excel 0 January 12th 10 08:56 PM
Excel 7, paste linked to word becomes black when word pdf'd Surffreak Excel Discussion (Misc queries) 0 June 1st 08 12:17 AM
cannot paste in Excel or word. Ely Kaplansky Excel Discussion (Misc queries) 2 March 7th 08 09:13 PM
PASTE LINK option not available when I select PASTE SPECIAL to link an image in Excel to a Word document. tln Links and Linking in Excel 0 April 22nd 07 04:28 PM
deleting phrases in Excel and/or Word v New Users to Excel 2 February 28th 07 01:43 AM


All times are GMT +1. The time now is 06:53 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"