Break links in .pptx before saving (from excel vba)

  • Hi all

    I have an excel macro that draws some numbers from a database to populate an excel spreadsheet and then updates some graphs in a .pptx and sends it via outlook. It all works fine but now I really want to break the links in all graphs to avoid people accidentially updating the data (the reports are supposed to show data from a specific date).

    I found a solution that worked well from inside powerpoint and tried to do something similar in my vba macro. When I run my modified macro now I get this error though: "Run-time error: Method 'BreakLink' of object 'LinkFormat' failed"

    Here is the snippet of my code that concerns the linkbreaking:

    The vba editor recognizes the BreakLink method (suggests it), and I referenced the PowerPoint object library. Any ideas to what may cause this error and how to fix it - or an alternate method entirely to remove the links.

    Thanks in advance

    Edit: I use Office 2013 in case that might be important.