Macro To Copy Resulting Cell To Word Document

oli123

New Member
Joined
Nov 17, 2010
Messages
32
Hi there, i am looking for some kind of macro that would allow me to copy partial/selected text data from my excel spreadsheet and transfer over to word. I am currently using a macro which copies the data on separate excel spreadsheet and I must then open word doc to paste the results. Im just wondering if there is an easier way to handle this?

Thnx,
Oli
 

Excel Facts

Control Word Wrap
Press Alt+Enter to move to a new row in a cell. Lets you control where the words wrap.
This does will allow that, you need to make sure you set the reference library in VBA to have Microsoft Word object library as well!

Code:
Option Explicit

Sub Excel_to_Word()
Dim appWord As Word.Application

Set appWord = New Word.Application

appWord.Visible = True

selection.Copy

appWord.Documents.Add.Content.Paste

End Sub

Hope this helps.
 
Upvote 0
This does will allow that, you need to make sure you set the reference library in VBA to have Microsoft Word object library as well!

Code:
Option Explicit

Sub Excel_to_Word()
Dim appWord As Word.Application

Set appWord = New Word.Application

appWord.Visible = True

selection.Copy

appWord.Documents.Add.Content.Paste

End Sub
Hope this helps.

Awesome, Thank you very much !
 
Upvote 0

Forum statistics

Threads
1,224,541
Messages
6,179,418
Members
452,912
Latest member
alicemil

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