PPT2000: Cannot Embed MIDI Files into a Presentation
ID: Q237976
|
The information in this article applies to:
-
Microsoft PowerPoint 2000
SUMMARY
When you insert a MIDI (.mid) file into a PowerPoint 2000 presentation, the file is not embedded into the file structure. Instead an "implied link" is created to the location of the MIDI file.
If the MIDI file is in the same directory as the presentation, the link is stored using only the file name. When PowerPoint loads the file, it searches the same directory where the presentation is located. If the MIDI file is located in another directory, then a fully qualified file path will be created to link to the file.
MORE INFORMATION
You cannot edit the link to the MIDI file through the Links dialog box. You can only modify it with a Visual Basic for Applications (VBA) macro.
Microsoft provides programming examples for illustration only, without warranty
either expressed or implied, including, but not limited to, the implied warranties of
merchantability and/or fitness for a particular purpose. This article assumes that you
are familiar with the programming language being demonstrated and the tools used to
create and debug procedures. Microsoft support professionals can help explain the functionality
of a particular procedure, but they will not modify these examples to provide added
functionality or construct procedures to meet your specific needs. If you have limited
programming experience, you may want to contact a Microsoft Certified Solution Provider
or the Microsoft fee-based consulting line at (800) 936-5200. For more information about
Microsoft Certified Solution Providers, please see the following page on the World Wide Web:
http://www.microsoft.com/mcsp/
For more information about the support options available from Microsoft, please see the
following page on the World Wide Web:
http://www.microsoft.com/support/supportnet/overview/overview.asp
The following code sample requires that you select the MIDI file before you run the macro. You will be prompted with a dialog box that has the current path for the MIDI file. Just type the path to the new location, and press OK.
Sub MIDIpath()
On Error GoTo ErrorHandler ' Enable error-handling routine.
Dim strCurrentLocation As String
Dim strNewLocation As String
' This requires that you have selected a MIDI file
' before running this macro
With ActiveWindow.Selection.ShapeRange
' Save the current settings for the file's location
strCurrentLocation = .LinkFormat.SourceFullName
' Get the new location for the file.
strNewLocation = InputBox("Enter in new MIDI File Location", _
Default:=strCurrentLocation)
' If the strNewLocation is not empty, then assign
' it to SourceFullName.
' NOTE: This does not check to see if the file is
' actually in the location specified.
If strNewLocation <> "" Then
.LinkFormat.SourceFullName = strNewLocation
End If
End With
Exit Sub ' Exit the subroutine to avoid the error handler.
ErrorHandler: ' Error-handling routine.
' Let the user know that no MIDI file was selected.
MsgBox "No MIDI file has been selected." & vbNewLine & _
"Please select a MIDI file icon and run this macro again."
End Sub
REFERENCES
For more information about using the sample code in this article, click
the article number below to view the article in the Microsoft Knowledge
Base:
Q212536
OFF2000: How to Run Sample Code from Knowledge Base Articles
Additional query words:
change move linking files midid music howto get ppt ppt9 ppt2k 2k 2000 powerpnt
Keywords : kbmm kbui kbdta
Version : WINDOWS:2000
Platform : WINDOWS
Issue type : kbhowto kbprb