View Single Post
  #5  
Old 09/10/2010
roman's Avatar
roman roman is offline
Moderador
 
Join Date: May 2003
Location: Ciudad de México
Posts: 20,269
Rep Power: 10
roman Es un diamante en brutoroman Es un diamante en brutoroman Es un diamante en bruto
Mmm. No sé el macro, pero en delphi podría funcionar esto:

Código Delphi [-]
uses ComObj;

const
  wdInlineShapePicture = 3;
  wdInlineShapeLinkedPicture = 4;

procedure QuitaImagenes(Archivo: String);
var
  WordApp: OleVariant;
  Documento: OleVariant;
  Shape: OleVariant;
  I: Integer;

begin
  WordApp := ComObj.CreateOleObject('Word.Application');
  Documento := WordApp.Documents.Open(Archivo);

  for I := Documento.InlineShapes.Count downto 1 do
  begin
    Shape := Documento.InlineShapes.Item(i);
    if Integer(Shape.Type) in [wdInlineShapePicture, wdInlineShapeLinkedPicture] then
      Shape.Delete;
  end;

  Documento.Close;
  WordApp.Quit;
end;

Aunque imagino que aplicado a 3000 archivos puede ser un poco lento.

// Saludos
Reply With Quote