Consulting

Results 1 to 2 of 2

Thread: VBA to change PowerPoint link sources to the Excel file that opened it

  1. #1

    VBA to change PowerPoint link sources to the Excel file that opened it

    Hey, all. I have an Excel template users open and enter client data. A macro button saves the file to their desktop with a new client file name and opens a PowerPoint template. I have links in the PowerPoint whose source I would like to automatically update with the path and file name of the Excel file that opened it i.e. its not a fixed path and user could have more than one Exccel file opened. I have the Excel file's path and file name stored in a cell. Any help? Thanks.

  2. #2
    VBAX Master
    Joined
    Feb 2007
    Posts
    2,094
    Location
    You would need to explain / post the code you have.

    This might get you started:

    [VBA]Sub link_switch()
    Dim osld As Slide
    Dim oHL As Hyperlink
    Dim strNewLink As String
    'strNewLink= set to the [path and name in the Excel file]
    For Each osld In ActivePresentation.Slides
    For Each oHL In osld.Hyperlinks
    oHL.Address = strNewLink
    Next oHL
    Next osld
    End Sub[/VBA]
    John Wilson
    Microsoft PowerPoint MVP
    Amazing Free PowerPoint Tutorials
    http://www.pptalchemy.co.uk/powerpoi...tutorials.html

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •