Linked images do not appear when the presentation and the images are moved to a new drive or folder in PowerPoint 2003 (827115)
The information in this article applies to:
- Microsoft Office PowerPoint 2003
SYMPTOMS After you move both a PowerPoint 2003 presentation and
pictures that are linked to that presentation to a new drive or to a folder
location, the pictures are not visible. Instead, the pictures appear as
placeholders, even though the pictures are in the same folder on the same drive
where the presentation is located.
For example, you create a
presentation that contains many linked images, and then you write it to a
recordable CD (CD-R). When you open the presentation from the CD-R on another
computer, the images do not appear in the presentation, even though they are on
the CD-R.CAUSEThis problem occurs because the folder that contains the
pictures has been moved. PowerPoint uses an absolute path to locate the linked
images. If the drive letter or path changes, the images do not appear. This
problem may occur when a presentation that was created on drive C is written to
the root directory of a CD-R, and then opened from the CD-ROM drive, typically
drive D. Because the paths of the linked images start with C, the images are
not found when the presentation is opened.WORKAROUND To work around this problem, use either of the following
methods. Method 1: Use the Package for CD Feature PowerPoint 2003 has a feature named Package for CD. When you want
to run a presentation on another computer, the Package for CD feature can put
all the required files in one archive file. If you have CD burning hardware,
you can copy presentations to a blank recordable CD (CD-R), a blank rewritable
CD (CD-RW), or a CD-RW that has existing content. However, existing content on
the CD-RW will be overwritten. You can also use the Package for CD feature to
copy the presentation to a folder on your computer, a network location, or, if
you do not include the viewer, a floppy disk instead of directly to a CD. You
can then unpack the file on the destination computer or the network share and
run the presentation. When you package your presentation, linked
files are included automatically, although you have the option to exclude them.
You can also add other files to the presentation package. The Package for CD
feature converts the absolute paths of the picture links to relative ones. That
is, instead of the path being "C:\My Documents\My Pictures\image001.jpg", the
path becomes"image001.jpg". Packing a Presentation and Associated Files To use the Package for CD feature on a presentation to run on
another computer, follow these steps:
- Open the presentation that you want to package. If you are
working with a new presentation that has not been saved previously, save the
presentation.
Note Before you give others a copy of the presentation, it is a good
idea to review personal and hidden information, and decide if it is appropriate
to include. You may want to remove comments, ink annotations, and markup before
you package your presentation. - Insert a CD into the CD drive.
Notes- You will require one of the following types of CDs: a
blank recordable CD (CD-R), a blank rewritable CD (CD-RW), or a CD-RW that has
existing content that can be overwritten.
- If you use a CD-R, make sure that you copy all the
files that you want onto the CD the first time.
After the files are
copied, you cannot add more files to the CD.
- On the File menu, click Package
for CD.
- In the Name the CD box, type a name for
the CD.
- To specify the presentations to include and the play order,
do any of the following:
- To add more presentations or other files that are not
included automatically, click Add Files. Select the files that
you want to add, and then click Add.
- By default, presentations are set up to run
automatically in the order that they are listed in the Files to be copied list.
To change the play order, select a presentation, and then click the UP ARROW or
the DOWN ARROW to move it to a new position in the list.
Note By default, the presentation that is currently open is already in
the Files to be copied list. Files that are linked to the presentation, such as
graphic files, are included automatically but do not appear in the Files to be
copied list. Additionally, the Microsoft Office PowerPoint Viewer is included
by default so that you can run the packaged presentation on a computer that
does not have PowerPoint installed. - To remove a presentation, select the presentation, and
then click Remove.
- To change the default settings, click
Options, and then do any of the following:
- To exclude the Viewer, click to clear the
PowerPoint Viewer check box.
- To prevent presentations from playing automatically or
to specify a different automatic play option, select your preference from the
Choose how presentations will play in the PowerPoint Viewer
list.
- To include TrueType fonts, click to select the
Embedded TrueType fonts check box.
- To require a password to open or edit all packaged
presentations, under Secure the PowerPoint files, type the
password that you want to use.
- To close the Options dialog box, click
OK.
- Click Copy to CD.
Note You can use this procedure to package one or more presentations
in a folder on your computer or a network location instead of onto a CD.
Instead of clicking Copy to CD, click Copy to
Folder, and then provide the folder information.
Use a Macro Code to Set Relative PathMicrosoft provides programming examples for illustration only, without warranty either expressed or implied. This includes, but is not limited to, the implied warranties of merchantability or fitness for a particular purpose. This article assumes that you are familiar with the programming language that is being demonstrated and with the tools that are used to create and to debug procedures. Microsoft support engineers 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 requirements. Note The following macro examples work only in PowerPoint. Visual Basic for Applications macros are not supported by the Microsoft PowerPoint Viewer. For more information, click the following article number to view the article in the Microsoft Knowledge Base:
230746
PPT: Viewer: Presentation Macros Don't Run Within the Viewer
You can also use a macro to convert the links
from absolute to relative. This permits PowerPoint to locate the pictures based
on the presentation's current location, as long as the pictures are in this
same location. The following is a code sample that shows one way
that this can be automated. This code sample assumes that the presentation and
the linked pictures are in the same folder location. If they are not in the
same folder location, running this code will break the link to the picture. Sample Code- On the Tools menu, point to
Macro, and then click Security.
- Click Medium for the Security level, and
then click OK.
- On the Tools menu, point to
Macro, and then click Visual Basic Editor.
- On the Insert menu, click
Module.
- Type the following code in the module:
Sub RelPict()
Dim oSlide As Slide
Dim oShape As Shape
Dim lPos As Long
Dim strLink As String
'
' Loop through the presentation checking each shape
' on each slide to see if it is a linked picture.
'
For Each oSlide In ActivePresentation.Slides
For Each oShape In oSlide.Shapes
If oShape.Type = msoLinkedPicture Then
With oShape.LinkFormat
'
' Search from the right hand portion of the source
' file name and find the first backslash "\" character.
'
lPos = InStrRev(.SourceFullName, "\")
'
' Check to see if the link has already been modified.
'
If lPos <> Null Then
'
' Determine how long the file name is, by subtracting
' the position the "\" character was found at from
' the total length of the source file name.
'
lPos = Len(.SourceFullName) - lPos
'
' Extract the file name from the source file name, then
' assign the file name to the source file name, turning
' it into a relative path.
'
strLink = Right(.SourceFullName, lPos)
.SourceFullName = strLink
End If
End With
End If
Next oShape
Next oSlide
End Sub
STATUSMicrosoft has confirmed that this is a problem in the Microsoft products that are listed in the "Applies to" section.REFERENCES
For more information about packaging a presentation, click Microsoft PowerPoint Help on the
Help menu, type Package a presentation for
CD in the Office Assistant or the Answer Wizard, and then click Search to view the topic.
Modification Type: | Minor | Last Reviewed: | 1/12/2006 |
---|
Keywords: | kbmacro kbdisplay kbprb kbnofix KB827115 kbAudEndUser |
---|
|