Mail Merge issue

ankit4mi

New Member
Joined
Apr 28, 2021
Messages
8
Office Version
  1. 365
Platform
  1. Windows
  2. MacOS
I have created a excel file with all the formula and everything. Now I want to copy the table in excel file into word doc. can someone help me on that.
Mail Merge issue.PNG
 

Excel Facts

Whats the difference between CONCAT and CONCATENATE?
The newer CONCAT function can reference a range of cells. =CONCATENATE(A1,A2,A3,A4,A5) becomes =CONCAT(A1:A5)
This is not a "mail merge"? Isn't it "how to copy cells from Excel to Word"? If it really is, then something like this:
VBA Code:
Sub subToWord()
    Selection.Copy 
    Dim objWord As Word.Application
    Set objWord = CreateObject("Word.Application")
    With objWord
        .Documents.Add
        .Visible = True
        .Selection.PasteSpecial Link:=False, DataType:=wdPasteOLEObject, Placement:=wdInLine, DisplayAsIcon:=False
    End With
End Sub
Note: in Excel you need the Word object library checked as shown for this to work.
1619725578727.png
>
1619725595658.png

Before
 
Upvote 0
Solution
This is not a "mail merge"? Isn't it "how to copy cells from Excel to Word"? If it really is, then something like this:
VBA Code:
Sub subToWord()
    Selection.Copy
    Dim objWord As Word.Application
    Set objWord = CreateObject("Word.Application")
    With objWord
        .Documents.Add
        .Visible = True
        .Selection.PasteSpecial Link:=False, DataType:=wdPasteOLEObject, Placement:=wdInLine, DisplayAsIcon:=False
    End With
End Sub
Note: in Excel you need the Word object library checked as shown for this to work.
View attachment 37784 > View attachment 37785
Before
Thanks you so much for your help.
Can we have a code which can be run on Mac as well as this code is only running on Windows platform.
Thanks in Advance..!!!
 
Upvote 0
Not from me; I'm Mac-less. If you use Excel on the Mac too you should including that in your Version and Platform info:
1620852053204.png
 
Upvote 0
Can someone help me with the code which can be used in MAC as well..!!!
 
Upvote 0

Forum statistics

Threads
1,224,011
Messages
6,175,928
Members
452,684
Latest member
RRaively1

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