Word Macro to Copy Cells from Excel

winterberry

New Member
Joined
Jun 5, 2017
Messages
2
Hi, I have been Googling for quite a while now, and doing that, I have seen that most macros where written and used by Excel. I want to do a macro in word that will open a specific sheet in the excel workbook and copy its contents to a ready-made word template . Can anyone help me in achieving this? With my current code, I can just do until the opening of a certain sheet. But I cannot seem to find any code (word macro code) that can copy the contents and paste it in a ready made word template. Thanks guys.
 

Excel Facts

Does the VLOOKUP table have to be sorted?
No! when you are using an exact match, the VLOOKUP table can be in any order. Best-selling items at the top is actually the best.
Hi Winterberry,
maybe you should post your code what you already have into the thread that will help to understand what you have been doing.
Secondly you should look into bookmarks I think it is called in english those are needet to place data from excel into the word document...
Have a look if you can find any information about that on the net.

Should get you at least started on here so more can help.
 
Upvote 0
Word VBA to copy from excel data

Hi, I have an excel with exactly 120 rows and 4 columns. I want to auto populate those data into a word template(copy it to word application). But I cannot seem to find any word vba that does that, I mostly find excel vbas. I'm a newbie in doing macro, and what I have done so far is opening the excel and sheet that I need? Can anyone help me with this? Or at least guide me in how to copy the data from excel to word. TIA

The code so far
Code:
Dim oExcel As Excel.Application
Dim oWB As Workbook
Set oExcel = New Excel.Application
Set oWB = oExcel.Workbooks.Open("C:\Users\Berry\Documents\Meds.xls")
oExcel.Visible = True


oWB("Sheet2").Activate


Dim oWord As Object
Set oWord = CreateObject("Word.Application")
Dim oWW As Object
Set oWW = Documents.Open(":\Users\Berry\Documents\temp2.docm")
oWord.Visible = True
 
Upvote 0
Re: Word VBA to copy from excel data

I have merged your two threads together. All clarifications, follow-ups, and bumps should be posted back to the original thread. Per forum rules, posts of a duplicate nature will be locked or deleted (rule #12 here: Forum Rules).
 
Upvote 0

Forum statistics

Threads
1,214,834
Messages
6,121,873
Members
449,056
Latest member
ruhulaminappu

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