PDA

View Full Version : [SOLVED:] Change Links to Different Excel File



Baiano42
07-26-2019, 11:54 PM
Greetings,

I'm needing some help with developing a PPT macro to automatically adjust the currently excel linked object in my daily reports to the current folder the excel spreadsheet is saved in. I have been searching a number of forums, but have been unable to find a solution for my problem.

Problem: I have a daily report that I send out for work. Each day, the folder which the PPT report is saved in a new location. The way we save it is to save the PPT, zip it, loaded to company server, have a coworker load it to their computer, and unzipped it to their destination. Tho only consistent location for the report is C\...\...\...\...\...\...\reports\ProjectName_Daily Report #.PPTX
C\...\...\...\...\...\...\reports\DailyReportLink.xlsm

Here is how I save my daily project:
C:\Users\rayjort\Documents\Current Projects\CurrentDate\ProjectName\reports

Other coworkers sometimes save to their desktop:
C:\Users\PersonOnShifht\Desktop\CurrentProject\CurrentDate\ProjectName\repo rts

When we hand-off the project to our coworker, the link remains to the original folder it was created in. Is there a way to create a link to the current folder (i.e. a relative link) using any method (Either having it identify the current folder location and replacing the old link with a link to the current folder, or creating a relative relative hyperlink, copying that destination and replacing the old link with the new destination)?

Baiano42
07-30-2019, 12:53 PM
Ok, so I couldn't find a way to resolve the problem with updating the links in PPT using relative paths. However, I was successful at making it work in Excel. See link here for my solution: http://www.vbaexpress.com/forum/showthread.php?65583-Edit-Excel-Links-in-PPT-Using-VBA-and-Early-Binding