Paste Special From Excel into Word

Maryz

Board Regular
Joined
Dec 10, 2002
Messages
197
I’m experiencing a problem trying to paste data from a cell in Excel into a Word document. The following code works to paste my data into a table in Word.

Sheets("Data").Select
Range("B3").Select
Selection.Copy

Set doc = CreateObject("Word.Application")
doc.Visible = True
doc.Documents.Add
doc.Documents.Add.Content.Paste

What I’d like to do is paste special so that the final outcome in my Word document is plain unformatted text (not in a table or cell). When I experimented with the following paste special commands, what was pasted into word was a bitmap or cell that only showed partial data.

doc.Documents.Add.Content.PasteSpecial DataType:=wdPasteText

or

doc.Documents.Add.Content.PasteSpecial DataType:=wdPasteRTF

Can someone help me with the proper paste special command so that I can properly paste my data into a Word document?
 

Excel Facts

Format cells as currency
Select range and press Ctrl+Shift+4 to format cells as currency. (Shift 4 is the $ sign).
I think you will need to do the document.Add and PasteSpecial as two separate lines of code with :-
Selection.Range.PasteSpecial DataType:=wdPasteText
 
Upvote 0
This worked ok for me.<pre> Selection.PasteSpecial DataType:=wdPasteRTF
Selection.TypeParagraph
Selection.PasteSpecial DataType:=wdPasteText
Selection.TypeParagraph</pre>
Also, the macro recorder for Word 2002 suggested this:<Pre>Selection.PasteExcelTable LinkedToExcel:=False, WordFormatting:=False, RTF:=True</pre>You can change the last parameter, RTF, to False to paste as unformatted text.
 
Upvote 0
Hi,

I have a similar situation as this, but what I would like to do is create a cmd button that the user can click that will automatically create a copy in word, using a paste special command and then save the word document based on a range in the cell.

I am having the same problem when just doing the paste special, where data is dropping off the right side and bottom.

Is there a way I can create this button to do what I need and also auto format the spreadshhet into word where it fits perfectly?

Ron
 
Upvote 0
I’m experiencing a problem trying to paste data from a cell in Excel into a Word document. The following code works to paste my data into a table in Word.

Sheets("Data").Select
Range("B3").Select
Selection.Copy

Set doc = CreateObject("Word.Application")
doc.Visible = True
doc.Documents.Add
doc.Documents.Add.Content.Paste

What I’d like to do is paste special so that the final outcome in my Word document is plain unformatted text (not in a table or cell). When I experimented with the following paste special commands, what was pasted into word was a bitmap or cell that only showed partial data.

doc.Documents.Add.Content.PasteSpecial DataType:=wdPasteText

or

doc.Documents.Add.Content.PasteSpecial DataType:=wdPasteRTF

Can someone help me with the proper paste special command so that I can properly paste my data into a Word document?
w
 
Upvote 0

Forum statistics

Threads
1,224,566
Messages
6,179,555
Members
452,928
Latest member
101blockchains

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top