PPT: Run-Time Error Using the AddPicture Method

Last reviewed: March 10, 1998
Article ID: Q163146
The information in this article applies to:
  • Microsoft PowerPoint 98 Macintosh Edition
  • Microsoft PowerPoint 97 for Windows

SYMPTOMS

When using the AddPicture method to add a picture to a Microsoft PowerPoint slide, you receive the following error message:

   Run-time error '-2147188160 (80048240)':
   Shapes (unknown member): Out of memory error.

CAUSE

This error message occurs when you pass an invalid parameter to the AddPicture method. For example, this error occurs when the LinkToFile parameter is set to msoFalse (or has an integer value of 0) and the SaveWithDocument parameter is set to msoFalse. These settings instruct PowerPoint to embed the picture in the presentation, but to save the link information. An embedded picture does not contain link information.

RESOLUTION

To prevent the run-time error message, choose either of the following methods:

Method 1. Link the picture and save the link information

To link the picture and save the link information, set the LinkToFile parameter to msoTrue and the SaveWithDocument parameter to msoFalse.

Method 2. Embed the picture and save the picture with the presentation

To embed the picture and save the embedded picture with the presentation, set the LinkToFile parameter to msoFalse and the SaveWithDocument parameter to msoTrue.

For more information about the AddPicture method, click the Office Assistant, type "AddPicture," click Search, and then click to view "AddPictureMethod."

NOTE: If the Assistant is hidden, click the Office Assistant button on the Standard toolbar. If PowerPoint Help is not installed on your computer, please see the following article in the Microsoft Knowledge Base:

   ARTICLE-ID: Q120802
   TITLE     : Office: How to Add/Remove a Single Office Program or
               Component

REFERENCES

For more information about getting help with Visual Basic for Applications, please see the following article in the Microsoft Knowledge Base:

   ARTICLE-ID: Q163435
   TITLE     : VBA: Programming Resources for Visual Basic for
               Applications


Additional query words: 8.00 ppt8 vba vbe macppt mac_ppt ppt98 powerpt
Keywords : kbcode kbmacro kbprg kbdta kbdtacode kbpptvba
Version : WINDOWS:97; MACINTOSH:98
Platform : MACINTOSH WINDOWS
Hardware : MAC x86
Issue type : kbhowto


THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Last reviewed: March 10, 1998
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.