Ver Mensaje Individual
  #5  
Antiguo 21-11-2014
shoulder shoulder is offline
Miembro
 
Registrado: abr 2008
Posts: 441
Reputación: 17
shoulder Va por buen camino
Outlook Microsoft 2010

Primero Gracias por tus respuestas, intente tu forma, otra que encontre parecida, me da siempre el mismo error. Si el outlook no esta abierto y minimizado me sale "El servidor no esta disponible" u "Operacion Anulada". Y no me deja hacer nada. Si tengo el outlook abierto funciona todo perfecto. Te muestro las forma que use.


Código Delphi [-]

  Outlook := TOutlookApplication.Create( nil );
  try
      Outlook.Connect;
      try
        olNameSpace := Outlook.GetNamespace('MAPI');
        olNameSpace.Logon('', '', False, False);
        try
           MailIt := TMailItem.Create( nil );
           MailIt.ConnectTo( Outlook.CreateItem( olMailItem ) as MailItem );
            try
             MailIt.Recipients.Add.........;
             ......................................
             MailIt.Display;
            finally
              MailIt.Free;
            end;
         finally
              MailIt.Free;
         end;
      finally
     //   Outlook.Disconnect;
      end;
   finally
      Outlook.free;
    end;

o la forma del ejemplo del post 1-
Código Delphi [-]
 try
       Outlook := GetActiveOleObject('Outlook.Application');
     except
      Outlook := CreateOleObject('Outlook.Application');
     end;

      MailItem := Outlook.CreateItem(olMailItem);
      MailItem.Recipients.Add(...........
...............................
      MailItem.Display;
      // MailItem.send;
      Outlook := Unassigned;
     
    end

Última edición por Casimiro Notevi fecha: 21-11-2014 a las 15:16:37.
Responder Con Cita