copy from XL2007, paste into Word 2007 table
-
- Panoramic Lounger
- Posts: 8191
- Joined: 25 Jan 2010, 09:09
- Location: retirement
copy from XL2007, paste into Word 2007 table
In XL 2007 select two or more cells in a column, right click and choose copy.
Switch to Word 2007 and select equiv. number of empty table cells, right click and choose paste.
Painless!
But do the same thing again having only copied a single XL cell and clicked into a single Word table cell and the right click has no paste option.
Irritation!
Paste as nested table is there but using that adds a paragraph mark.
Extra irritation!!
Ctrl V is no use either, the unasked for paragraph mark materialises once again.
Err why?
Ken
Switch to Word 2007 and select equiv. number of empty table cells, right click and choose paste.
Painless!
But do the same thing again having only copied a single XL cell and clicked into a single Word table cell and the right click has no paste option.
Irritation!
Paste as nested table is there but using that adds a paragraph mark.
Extra irritation!!
Ctrl V is no use either, the unasked for paragraph mark materialises once again.
Err why?
Ken
-
- Administrator
- Posts: 78625
- Joined: 16 Jan 2010, 00:14
- Status: Microsoft MVP
- Location: Wageningen, The Netherlands
Re: copy from XL2007, paste into Word 2007 table
A rather stupid bug!
As a workaround, activate the home tab of the ribbon and click the lower half of the Paste button.
Select Paste Special...
Select Formatted Text (or Unformatted Text if you're not interested in the Excel formatting), then click OK.
(I have a button for Paste Unformatted Text on my Quick Access Toolbar so it's only a single click)
As a workaround, activate the home tab of the ribbon and click the lower half of the Paste button.
Select Paste Special...
Select Formatted Text (or Unformatted Text if you're not interested in the Excel formatting), then click OK.
(I have a button for Paste Unformatted Text on my Quick Access Toolbar so it's only a single click)
Best wishes,
Hans
Hans
-
- Administrator
- Posts: 12629
- Joined: 16 Jan 2010, 15:49
- Location: London, Europe
Re: copy from XL2007, paste into Word 2007 table
Word 2007 and 2010 provide right click access to Paste plain text, which is even easier still (assuming you have used the mouse to position the insertion point).HansV wrote:...(I have a button for Paste Unformatted Text on my Quick Access Toolbar so it's only a single click)
StuartR
-
- Administrator
- Posts: 78625
- Joined: 16 Jan 2010, 00:14
- Status: Microsoft MVP
- Location: Wageningen, The Netherlands
Re: copy from XL2007, paste into Word 2007 table
You do not have the required permissions to view the files attached to this post.
Best wishes,
Hans
Hans
-
- Administrator
- Posts: 12629
- Joined: 16 Jan 2010, 15:49
- Location: London, Europe
Re: copy from XL2007, paste into Word 2007 table
Bother, you are right again.
My Word 2007 has Paste Plain Text on the right click menu because it was an upgrade from Word 2003 and I had added it to the right click menu myself! Word 2010 does have a wide range of Paste Special options on the right click menu.
My Word 2007 has Paste Plain Text on the right click menu because it was an upgrade from Word 2003 and I had added it to the right click menu myself! Word 2010 does have a wide range of Paste Special options on the right click menu.
You do not have the required permissions to view the files attached to this post.
StuartR
-
- Panoramic Lounger
- Posts: 8191
- Joined: 25 Jan 2010, 09:09
- Location: retirement
Re: copy from XL2007, paste into Word 2007 table
Ah! I wondered if if it was just me missing the obvious - againHansV wrote:A rather stupid bug!
A Paste Unformatted Text button on the QAT sounds like the simplest workaround
Ken
edited to add:
PS I can't find Paste Unformatted Text as an option to add to the QAT, even if I look through the list of 'All commands' so how did you achieve it on your PC?
-
- GoldLounger
- Posts: 2599
- Joined: 24 Jan 2010, 15:26
- Location: Olympia, WA
Re: copy from XL2007, paste into Word 2007 table
Just add "Paste Spacial" and when you do a "Paste" then the selection pane will appear.
I am so far behind, I think I am First
Genealogy....confusing the dead and annoying the living
Genealogy....confusing the dead and annoying the living
-
- Panoramic Lounger
- Posts: 8191
- Joined: 25 Jan 2010, 09:09
- Location: retirement
Re: copy from XL2007, paste into Word 2007 table
True, perhaps I'm reading too much into Hans' comment about him having a Paste Unformatted button on his QAT.
Ken
Ken
-
- Administrator
- Posts: 78625
- Joined: 16 Jan 2010, 00:14
- Status: Microsoft MVP
- Location: Wageningen, The Netherlands
Re: copy from XL2007, paste into Word 2007 table
I created a macrostuck wrote:how did you achieve it on your PC?
Code: Select all
Sub PasteUnformatted()
Selection.PasteSpecial DataType:=wdPasteText
End Sub
Best wishes,
Hans
Hans
-
- Panoramic Lounger
- Posts: 8191
- Joined: 25 Jan 2010, 09:09
- Location: retirement
Re: copy from XL2007, paste into Word 2007 table
Thought so!HansV wrote:I created a macro
Ken
-
- 5StarLounger
- Posts: 1106
- Joined: 21 Jan 2011, 16:51
- Location: Florida
Re: copy from XL2007, paste into Word 2007 table
Great idea (i.e. immediately plagiarized by myself), but the "Selection." part puzzled me. Being a very neophyte to OOP, I try to get my head around the objects, methods, properties (but please don't ask me to understand classes, ARRRGGGGHHHH - please give me computed GOTO's again!!!), but the idea that the Selection thing exists in Word when what I've selected is in Excel bothers me on a very low level.HansV wrote:I created a macro
Code: Select all
Sub PasteUnformatted() Selection.PasteSpecial DataType:=wdPasteText End Sub
I try to understand what I see in the Watch window in the VBA IDE, when I set a watch on Selection, I just don't understand how Selection isn't "Null" or "Nothing" when I haven't selected anything in Word. A reference (to something other than a psychology text) may be helpful.
PJ in (usually sunny) FL
-
- Administrator
- Posts: 78625
- Joined: 16 Jan 2010, 00:14
- Status: Microsoft MVP
- Location: Wageningen, The Netherlands
Re: copy from XL2007, paste into Word 2007 table
The macro will paste whatever is on the clipboard to the current selection in Word. This selection can be some text, or it can be the insertion point. If it is the insertion point, it is a range of length 0, but it is not Null or Nothing - even a range of length 0 has many properties: its location within the document, the font settings etc.
Best wishes,
Hans
Hans
-
- Administrator
- Posts: 12629
- Joined: 16 Jan 2010, 15:49
- Location: London, Europe
Re: copy from XL2007, paste into Word 2007 table
My version of that Macro is a bit longer, to prevent an error message being displayed if the clipboard cannot be pasted as plain text (for example if you have copied a picture).
Code: Select all
Sub PastePlainText
On Error GoTo Done
Selection.PasteSpecial DataType:=wdPasteText
Done:
Exit Sub
End Sub
StuartR
-
- Administrator
- Posts: 78625
- Joined: 16 Jan 2010, 00:14
- Status: Microsoft MVP
- Location: Wageningen, The Netherlands
Re: copy from XL2007, paste into Word 2007 table
You could shorten that to
Code: Select all
Sub PastePlainText
On Error Resume Next
Selection.PasteSpecial DataType:=wdPasteText
End Sub
Best wishes,
Hans
Hans
-
- 5StarLounger
- Posts: 1106
- Joined: 21 Jan 2011, 16:51
- Location: Florida
Re: copy from XL2007, paste into Word 2007 table
Hans,
Thank you for taking the time to help explain to someone who is OOP-challenged!
PJ
Thank you for taking the time to help explain to someone who is OOP-challenged!
PJ
PJ in (usually sunny) FL