File Sharing Problems

How to Update Linked Excel Chart Paths in PowerPoint with VBA

Steve KSteve K Nov 3, 2026 869 views

Question details

The user needs to update the source paths for more than 200 linked Excel charts in a PowerPoint presentation so the files can be moved to a USB drive without breaking the links.

How to Update Linked Excel Chart Paths in PowerPoint Using VBA
Product
PowerPoint, Excel
Device & OS
not provided
Scenario
Migrating a PowerPoint presentation containing hundreds of linked Excel charts to a portable USB drive for use on different computers.
Observed behavior
The presentation relies on hardcoded paths that include specific drive letters. When moved to a USB drive, the drive letter changes, causing the links to break.
Before you start

Copy both the PowerPoint presentation and the linked Excel workbooks to a local folder on your computer before updating any links, as editing Office files directly on a USB drive increases the risk of file corruption.

Solution 1Recommended

Use VBA to Batch Update OLE Links

Use a Visual Basic for Applications (VBA) macro to programmatically find and replace the old file paths with the new directory path across all slides.

When dealing with hundreds of linked charts, manually updating links via the 'Edit Links' dialog is impractical. A VBA script can iterate through all shapes on all slides, identify linked OLE objects, and update their source paths.

Ensure you update the links to point to your new local directory first. Once the links are successfully updated and saved, you can copy the finalized folder to your USB drive.

1
Copy files to a local folder

Create a new folder on your local hard drive and place both the Excel workbook and the PowerPoint presentation inside it.

2
Open the VBA Editor

Open the presentation in PowerPoint and press 'Alt + F11' to open the Visual Basic for Applications editor.

3
Insert a new module

Click 'Insert' > 'Module' in the top menu and paste your link-updating VBA script that is designed to replace the old path string with the new local path string.

4
Run the macro

Press 'F5' to execute the code. Wait for the macro to process all the linked charts in your presentation.

5
Save and transfer

Save the PowerPoint presentation. Once saved, copy the entire folder containing both the presentation and the Excel file to your USB drive.

USB Drive Letters: Remember that USB drive letters (e.g., D:, E:, T:) can change depending on the computer they are plugged into. If you use a VBA script to set a specific USB drive letter, the links may still break on a different PC.
Efficiently Manage Linked Data

Manage Linked Presentations Seamlessly with WPS Presentation

WPS Office offers robust handling of OLE objects and linked charts. You can easily view, update, or break links directly in your WPS Presentation without needing complex VBA scripts for everyday external data management.

  1. 1. Open your presentation: Launch WPS Presentation and open your .pptx file containing the linked charts.
  2. 2. Access link settings: Navigate to the 'Menu' and select 'Edit Links' to view a list of all linked external Excel files.
  3. 3. Change source paths: Select the links you want to modify and click 'Change Source' to easily map them to the new local file paths.
  4. 4. Break links for portability: If you are moving to a USB drive, use the 'Break Link' option to quickly convert charts to embedded objects to prevent path errors.
Fully compatible with Microsoft PowerPoint (.pptx) and Excel (.xlsx) formats.Intuitive 'Edit Links' dialog for managing and updating external data sources easily.Lightweight software that runs smoothly even with presentations containing hundreds of charts.Built-in tools to seamlessly embed data, ensuring complete portability on USB drives.
microsoft office alternative - wps office

Frequently Asked Questions

Why do my Excel chart links break when I move the PowerPoint to a USB drive?

Links usually break because PowerPoint uses absolute paths (like C:\Folder\File.xlsx). When moved to a USB drive, the drive letter changes depending on the computer (e.g., D:\ or E:\), making the original hardcoded path invalid.

Is it safe to run a VBA macro to update links directly on a USB drive?

No, it is highly recommended to copy the files to your local hard drive first, update the links there, and then copy the updated folder back to the USB drive. Editing Office files directly on a removable drive increases the risk of file corruption and data loss.

Can I use relative paths for linked Excel charts in PowerPoint?

PowerPoint generally defaults to absolute paths for OLE links. While some workarounds exist by saving files in the exact same directory before inserting the links, using a VBA script to batch-update the absolute path or embedding the files are the most reliable methods for ensuring portability.

How do I access the menu to manually check my chart paths?

In PowerPoint, click on 'File', then go to 'Info'. Look for an option at the bottom right called 'Edit Links to Files'. Clicking this opens a dialog box showing all current external paths for your linked charts.