Club Delphi  
    Paypal   FTP   CCD     Buscar   Trucos   Trabajo   Foros

Retroceder   Foros Club Delphi > Principal > Varios
Registrarse FAQ Miembros Calendario Guía de estilo Temas de Hoy

Coloboración Paypal con ClubDelphi

 
 
Herramientas Buscar en Tema Desplegado
  #14  
Antiguo 11-10-2006
Carliviris Carliviris is offline
Miembro
 
Registrado: abr 2006
Posts: 93
Poder: 21
Carliviris Va por buen camino
me da este error cuando intento usar el document.printout:


Código Delphi [-]
---------------------------
Debugger Exception Notification
---------------------------
Project contratos.exe raised exception class EOleError with message 'Method 'PrintOut' not supported by automation object'. Process stopped. Use Step or Run to continue.
---------------------------
OK   Help   
---------------------------

Aqui les presento la parte del codigo donde utilizo el printout:

Código Delphi [-]
function TwinMain.CONTRATO_StringReplace(ADocument: TFileName; Sender: TObject): Boolean;
const
  wdFindContinue = 1;
  wdReplaceOne = 1;
  wdReplaceAll = 2;
  wdDoNotSaveChanges = 0;
var
 i           : integer;
 Flags       : TWordReplaceFlags;
begin

  Result := False;
  Flags  := [wrfReplaceAll];

  { Chequea si el archivo existe }
  if not FileExists(ADocument) then
   begin
    ShowMessage('El documento especificado no existe');
    Exit;
  end;

  { Creando el Objeto Ole }
  try
    WordApp := CreateOLEObject('Word.Application');
  except
    on E: Exception do
    begin
      E.Message := 'Microsoft Word no esta habilitado';
      raise;
    end;
  end;

  Contrato_SearchString;

  try
  { Ocultar Microsoft Word }
   WordApp.Visible := true;
    { Abrir el documento }
   WordApp.Documents.Open(ADocument);

   { Inicializacion de los parametros}
    for i:= 1 to 28 do
     begin
       //Para desplegar el desglose_inicial//
       if i = 27 then
        Desg_Inicial_Cont;

       if ((i <> 28) and (i <> 27)) then
        begin
         WordApp.Selection.Find.ClearFormatting;
         WordApp.Selection.Find.Text := SearchStr[i];
         WordApp.Selection.Find.Replacement.Text := ReplaceStr[i];
         WordApp.Selection.Find.Forward := True;
         WordApp.Selection.Find.Wrap := wdFindContinue;
         WordApp.Selection.Find.Format := False;
         WordApp.Selection.Find.MatchCase := wrfMatchCase in Flags;
         WordApp.Selection.Find.MatchWholeWord := False;
         WordApp.Selection.Find.MatchWildcards := wrfMatchWildcards in Flags;
         WordApp.Selection.Find.MatchSoundsLike := False;
         WordApp.Selection.Find.MatchAllWordForms := False;

         { Perform the search}
         if wrfReplaceAll in Flags then
           WordApp.Selection.Find.Execute(Replace := wdReplaceAll)
         else
           WordApp.Selection.Find.Execute(Replace := wdReplaceOne);
       end
       else
        begin
            //Para desglose_cuotas//
           DesgloseCuotas;
        end;
     end;
     finally
      WordApp.Documents.PrintOut;
Responder Con Cita
 



Normas de Publicación
no Puedes crear nuevos temas
no Puedes responder a temas
no Puedes adjuntar archivos
no Puedes editar tus mensajes

El código vB está habilitado
Las caritas están habilitado
Código [IMG] está habilitado
Código HTML está deshabilitado
Saltar a Foro

Temas Similares
Tema Autor Foro Respuestas Último mensaje
Imprimir y Cerrar Word yorllito Servers 2 18-05-2006 02:33:53
Al imprimir docs.word con shellexecute..... Javier_A OOP 4 18-01-2006 16:59:22
"Word no envia la orden de imprimir de mi impresora" karekano85 Servers 0 09-12-2005 23:25:11
modificar documento word sin el word instalado joaquinmol Servers 0 30-03-2005 19:58:54
Imprimir con word en impresora en concreto Firibiri Servers 0 07-10-2003 11:09:09


La franja horaria es GMT +2. Ahora son las 03:22:00.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2026, Jelsoft Enterprises Ltd.
Traducción al castellano por el equipo de moderadores del Club Delphi
Copyright 1996-2007 Club Delphi