Insufficient Memory?!?

J

John Svendsen

Hi there, I am running a macro that copies all word tables from PPT to a
WORD document (listed below), but with a large PPT file I get "Insufficient
Memory or Disk space. Close extra windows and save your work" and "VB
Run-time error '-2147220995 (800401fd)' AVG Test field or no virus found" -
I have 512MB RAM, 80GB disk, AMD Athlon 2800+ (what does AVG have to do with
this ?!?!?). Does anybody have a clueof what's going on here? something I
forgot to clean-up in the code? Thanks so much! JS
================
Sub CopyPasteShape()
Dim shp As Shape
Dim sld As Slide
Dim wdApp As Word.Application
Dim oDoc As Word.Document
Set wdApp = New Word.Application
With wdApp
.Documents.Add
.Visible = True
End With
For Each sld In Application.ActivePresentation.Slides
For Each shp In sld.Shapes
If shp.Type = msoEmbeddedOLEObject Then
If shp.OLEFormat.ProgID = "Word.Document.8" Then
Set oDoc = shp.OLEFormat.Object
oDoc.Select
Selection.Copy
With wdApp
.Selection.Paste
.Selection.TypeParagraph
End With
Set oDoc = Nothing
End If
End If
Next shp
Next sld
End Sub
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top