Copying Pivot Table Data from Excel to Word

peterhay

New Member
Joined
May 1, 2007
Messages
26
Hi

I have a workbook that contains a number of Pivot Tables.

I want to create a macro that enables me to copy Pivot Table data into Word.

Given that the shape and size of the Pivot Table can vary I am struggling to find a way of automatically finding and selecting all the cells within the Pivot Table.

Any help on this much appreciated.

Thanks
Pete
 

Excel Facts

VLOOKUP to Left?
Use =VLOOKUP(A2,CHOOSE({1,2},$Z$1:$Z$99,$Y$1:$Y$99),2,False) to lookup Y values to left of Z values.
You can use the TableRange1 property, which excludes the page fields, or the TableRange2 property which includes them.
 
Upvote 0
Hello,

Sorry - I'm new to this forum, so I apologize if I'm doing something contrary to general etiquette on this forum.

I am completely new to VBA, but I have a decent grasp of basic programming concepts (I learned originally from Python). At my work, I have been given the task to find a way to find a way to create a macro that will copy and paste PivotTables in an Excel workbook to a Word document. I was surprised that I was able to find something on this website about it, as a Google search didn't help me at all. I have already asked this question on StackOverflow:

I have searched online for the past few days for an answer to this question, but to no avail.

For a project at my work, my boss is wondering if it is possible to create a macro which can select a PivotTable and place it in certain points of a Word document (not the beginning of the document, necessarily). I don't at all consider myself familiar with VBA, but I can understand the syntax. I would imagine the way to approach this would be to select a certain Range and Worksheet in Excel, copy and paste whatever is in the range, and put it in some point of the Word document. But I'm not sure how to implement the part with Word.

Does anyone have suggestions on, at the very least, how I could approach this?

Thanks.
 
Upvote 0

Forum statistics

Threads
1,214,411
Messages
6,119,356
Members
448,888
Latest member
Arle8907

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