If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
HyperLinks to Excel files in PowerPoint presentation
Hi,
I need to prepare a navigator - mini presentation with few slides that will have hyperlinks to Excel files. The excel files have predictable names, but the name change with the data waves coming. The Excel files can be in the same folder or in subfolder - at the end of the day I'll prepare a portable presentation and send it with a viewer, so the hyperlinks will be relative anyway. The number of hyperlins may change a bit. The ideal situation would be if the links were in textboxes, so I can check the text in the box and, on the basis of it, find the proper file for each link. The list of text-link may be prepared in Excel worksheet for example. I have found some hints how to change the links, but the examples use msoLinkedOLEObject and after that .LinkFormat that does not work with text boxes. This is great for updating charts source data, but I don't know how to use is in my case. Below I enclose the quoted hints found on this newsgroup (thanks for Shyam Pillai) I'd be verz grateful for any ideas how to solve it. Regrads, Michal Liczba trafień 2 Autor:Shyam Pillai ) Temat: Code to change an Excel Object source file View: Complete Thread (liczba dokumentów: 2) Original Format Grupy dyskusyjne:microsoft.public.powerpoint Data:2002-03-21 18:14:50 PST Glauco, I am not very sure about the requirement, do you wish to change the name of the source path information. Here is an example of updating links. I'm sure you could make the necessary modifications to suit it to your needs. This example updates all the linked file paths to reflect the new path "C:\Documents and Settings\Documents\" '------ Code begins here ----- Public Const NewLinkPath = "C:\Documents and Settings\Documents\" Sub UpdateToNewLinks() Dim I As Integer Dim J As Integer ' Create a variable to store the file reference string. Dim LinkFileName As String ' Set a For loop to go from slide 1 to the last slide in the presentation. For I = 1 To ActivePresentation.Slides.Count ' Select the slide based on the index value. With ActivePresentation.Slides(I) ' Loop through all the objects on slide. For J = 1 To .Shapes.Count ' Use only shapes on the slide. With .Shapes(J) ' If the shape's type is an OLE object then... If .Type = msoLinkedOLEObject Then ' Ideally you should determine the type of OLE Object before working on it. ' In this case I am assuming only wav/avi files have been linked. ' Change the path to new source and set the update type to Automatic. With .LinkFormat ' Now we shall extract the filename from the complete path. ExtractFilename is a function ' written by me to extract only the filename from a fully qualified path. ' Write your own "ExtractFileName" function. I have not included the code for it ' In case you have difficulty with it then get in touch with me. LinkFileName = ExtractFilename(.SourceFullName) ' Concatinate the new Path and filename and assign it to the SourceFullName .SourceFullName = NewLinkPath & LinkFileName .AutoUpdate = ppUpdateOptionAutomatic End With End If End With Next J End With Next I ' Update all links in the presentation, so that the changes are ' visible and the source file locations are correct on the screen. ActivePresentation.UpdateLinks End Sub ' -------- Code ends here --------- Regards Shyam Pillai Handout Wizard http://www.mvps.org/skp/how/ |
#2
|
|||
|
|||
HyperLinks to Excel files in PowerPoint presentation
I need to prepare a navigator - mini presentation with few slides that
will have hyperlinks to Excel files. What sort of links? I can think of three or four different ways of doing this offhand and each would require a different approach. If you were to create the link manually, what steps would you follow? The excel files have predictable names, but the name change with the data waves coming. The Excel files can be in the same folder or in subfolder - at the end of the day I'll prepare a portable presentation and send it with a viewer, so the hyperlinks will be relative anyway. Have a look here - depending on the type of links you need, this might be easily adaptible: Create an index with links to a folder full of PPT files http://www.rdpslides.com/pptfaq/FAQ00291.htm The number of hyperlins may change a bit. The ideal situation would be if the links were in textboxes, so I can check the text in the box and, on the basis of it, find the proper file for each link. The list of text-link may be prepared in Excel worksheet for example. I have found some hints how to change the links, but the examples use msoLinkedOLEObject and after that .LinkFormat that does not work with text boxes. This is great for updating charts source data, but I don't know how to use is in my case. Below I enclose the quoted hints found on this newsgroup (thanks for Shyam Pillai) I'd be verz grateful for any ideas how to solve it. Regrads, Michal Liczba trafień 2 Autor:Shyam Pillai ) Temat: Code to change an Excel Object source file View: Complete Thread (liczba dokumentów: 2) Original Format Grupy dyskusyjne:microsoft.public.powerpoint Data:2002-03-21 18:14:50 PST Glauco, I am not very sure about the requirement, do you wish to change the name of the source path information. Here is an example of updating links. I'm sure you could make the necessary modifications to suit it to your needs. This example updates all the linked file paths to reflect the new path "C:\Documents and Settings\Documents\" '------ Code begins here ----- Public Const NewLinkPath = "C:\Documents and Settings\Documents\" Sub UpdateToNewLinks() Dim I As Integer Dim J As Integer ' Create a variable to store the file reference string. Dim LinkFileName As String ' Set a For loop to go from slide 1 to the last slide in the presentation. For I = 1 To ActivePresentation.Slides.Count ' Select the slide based on the index value. With ActivePresentation.Slides(I) ' Loop through all the objects on slide. For J = 1 To .Shapes.Count ' Use only shapes on the slide. With .Shapes(J) ' If the shape's type is an OLE object then... If .Type = msoLinkedOLEObject Then ' Ideally you should determine the type of OLE Object before working on it. ' In this case I am assuming only wav/avi files have been linked. ' Change the path to new source and set the update type to Automatic. With .LinkFormat ' Now we shall extract the filename from the complete path. ExtractFilename is a function ' written by me to extract only the filename from a fully qualified path. ' Write your own "ExtractFileName" function. I have not included the code for it ' In case you have difficulty with it then get in touch with me. LinkFileName = ExtractFilename(.SourceFullName) ' Concatinate the new Path and filename and assign it to the SourceFullName .SourceFullName = NewLinkPath & LinkFileName .AutoUpdate = ppUpdateOptionAutomatic End With End If End With Next J End With Next I ' Update all links in the presentation, so that the changes are ' visible and the source file locations are correct on the screen. ActivePresentation.UpdateLinks End Sub ' -------- Code ends here --------- Regards Shyam Pillai Handout Wizard http://www.mvps.org/skp/how/ -- Steve Rindsberg, PPT MVP PPT FAQ: www.pptfaq.com PPTools: www.pptools.com ================================================ Featured Presenter, PowerPoint Live 2004 October 10-13, San Diego, CA www.PowerPointLive.com ================================================ |
#3
|
|||
|
|||
HyperLinks to Excel files in PowerPoint presentation
Steve Rindsberg wrote in message ...
What sort of links? I can think of three or four different ways of doing this offhand and each would require a different approach. If you were to create the link manually, what steps would you follow? Steve, Your sub MakeLotsOfLinks() solves everything. Of course I had to adapt it a bit (xls files, modifications about textbox positioning etc.), but the idea was there. Thank you very much for, as usual, very professional and accurate answer. Regards, Michal |
#4
|
|||
|
|||
HyperLinks to Excel files in PowerPoint presentation
Your sub MakeLotsOfLinks() solves everything. Of course I had to adapt
it a bit (xls files, modifications about textbox positioning etc.), but the idea was there. I figured you'd be able to run with it. Great! Thank you very much for, as usual, very professional and accurate answer. You're very welcome! -- Steve Rindsberg, PPT MVP PPT FAQ: www.pptfaq.com PPTools: www.pptools.com ================================================ Featured Presenter, PowerPoint Live 2004 October 10-13, San Diego, CA www.PowerPointLive.com ================================================ |
Thread Tools | |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
hyperlinks breaking a lot | shelleyc | Powerpoint | 20 | June 18th, 2004 02:17 AM |
Midi FIles on Powerpoint _ Help needed! | Mark Zerafa | Powerpoint | 2 | May 24th, 2004 05:04 PM |
PowerPoint Presentation in Word document! | Kumar | General Discussion | 2 | May 21st, 2004 01:26 PM |
Converting Quatro Pro files to Excel | Phil at Richardson | New Users | 1 | May 6th, 2004 07:19 PM |
cant open MS Excel files | Rita | Worksheet Functions | 0 | December 19th, 2003 12:16 PM |