Solved

Change PowerPoint links to Excel workbooks with VBA

Posted on 2009-06-29
4
742 Views
Last Modified: 2012-05-07
I have a presentation with a number of links to Excel workbooks/sheets. I can get to these through Edit... Links... and change them one at a time. I need to change the location of the workbooks, so I'd like to do them all at once programmatically. The tricky part here is that the filenames contain ranges, not just an Excel workbook name.

I tried replacing just the directory spec using something like this:
   .LinkFormat.SourceFullName = newPath & oldXLFN

I get an error message that says I can't do this because the filename is already open. I'm supposing that when I open the PPT presentation, that the links are then opened at the same time.

Is there some easy way to make this directory change in VBA? Each presentation has about 15 links and we have a number of presentations to update.

Thanks in advance for the help.
Tom
0
Comment
Question by:thomasedooley
4 Comments
 

Accepted Solution

by:
thomasedooley earned 0 total points
ID: 24745088
I think I found the problem. All day yesterday I was trying this, and getting the message that said "you already have a copy of this file open" as I stated above.

When shutting down my machine before going home, I got a spurious "do you want to save the changes made to thisfile.xls" from Excel (which was the linked Excel file I'm using in the PPT).

I tried this again this morning, and lo and behold, the code works (.linkformat.sourcefullname).

We can close this as solved by me, or delete it.

I appreciate the work put in by any experts on this problem, and would happily give points.

thanks
0

Featured Post

Courses: Start Training Online With Pros, Today

Brush up on the basics or master the advanced techniques required to earn essential industry certifications, with Courses. Enroll in a course and start learning today. Training topics range from Android App Dev to the Xen Virtualization Platform.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article will guide you to convert a grid from a picture into Excel format using Microsoft OneNote and no other 3rd party application.
This code takes an Excel list of URL’s and adds a header titled “URL List”. It then searches through all URL’s in column “A”, looking for duplicates. When a duplicate is found, it is moved to the top of the list. The duplicate URL’s are then highlig…
This Micro Tutorial demonstrates how to create Excel charts: column, area, line, bar, and scatter charts. Formatting tips are provided as well.
This Micro Tutorial will demonstrate in Microsoft Excel how to add style and sexy appeal to horizontal bar charts.

786 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question