Trying to Rescale images remotely in word from excel macro

Archie Smith 0 Reputation points

For my company one of the processes is copying graphs from an Excel spreadsheet and pasting them into a word document. However, these graphs are pasted slightly too big and need to be descaled to 80% their original size. I'm trying to write a macro in excel that will copy these graphs, paste them in and then reduce their size in word. From research online this is what I have so far:

Sub ExportChartToWord()

    Dim WrdApp As Word.Application
    Dim WordDoc As Word.Document
    Dim Chrt As ChartObject

    Set WrdApp = New Word.Application
        WrdApp.Visible = True

    Set WrdDoc = WrdApp.Documents.Add

    'chart 1
    Set Chrt = ActiveSheet.ChartObjects(1)
    With WrdApp.Selection
        .PasteSpecial Link:=False, DataType:=15, Placement:=wdInLine, _
    End With
End Sub

For simplicity I have only included one of the 4 charts in the following code but the other 3 are just the same line of code.

I would be very greatful for any support I could get. it seems like a simple problem but I just cant work it out!



A family of Microsoft word processing software products for creating web, email, and print documents.
591 questions
A family of Microsoft spreadsheet software with tools for analyzing, charting, and communicating data.
1,300 questions
An object-oriented programming language developed by Microsoft that is implemented on the .NET Framework. Previously known as Visual Basic .NET.
2,496 questions
Office Development
Office Development
Office: A suite of Microsoft productivity software that supports common business tasks, including word processing, email, presentations, and data management and analysis.Development: The process of researching, productizing, and refining new or existing technologies.
3,294 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Viorel 109.8K Reputation points

    After pasting the first image, try executing a code like this:

    WrdDoc.InlineShapes(1).ScaleWidth = 80
    WrdDoc.InlineShapes(1).ScaleHeight = 80
    1 person found this answer helpful.
    0 comments No comments