Usando Outlook

Re: Usando Outlook

Postby acuellar » Wed May 29, 2013 9:42 pm

Antonio

Como se cierra/termina olApp := CreateObject( "Outlook.Application" )
Intenté con olApp:End() da error, también intente con olApp:=Nil

Sale una alerta: "Otro programa está usando Outlook.."

Gracias.

Saludos,

Adhemar
Saludos,

Adhemar C.
User avatar
acuellar
 
Posts: 1643
Joined: Tue Oct 28, 2008 6:26 pm
Location: Santa Cruz-Bolivia

Re: Usando Outlook

Postby MGA » Sun Jun 02, 2013 11:04 pm

Alguns methodos novos:

oNameSpace:SendAndReceive(.F.)
oFolder:Items(n):UnRead()
oFolder:Items(n):UnRead(.f.)
oFolder:Items(n):body

TEST.PRG:

#include "fivewin.ch"

function Main()

Local oOutLook := CreateObject("OutLook.Application")
Local oNameSpace := oOutLook:GetNameSpace("MAPI")
Local oFolder, n

oNameSpace:Logon()

//ACIONAR ENVIAR / RECEBER automaticamente
//.T. = Abrir DIALOG
//.F. = Não Abrir DIALOG
oNameSpace:SendAndReceive(.F.)

//Folder Constants
//oFolder=3 ;Deleted items
//oFolder=4 ;Outbox
//oFolder=5 ;Sent Items
//oFolder=6 ;Inbox
//oFolder=9 ;Calendar
//oFolder=10 ;Contacts
//oFolder=11 ;Journal
//oFolder=12 ;Notes
//oFolder=13 ;Tasks
oFolder := oNameSpace:GetDefaultFolder(6)


nNumeroTotalEmail := oFolder:Items:Count

FOR i:=nNumeroTotalEmail TO 1 STEP -1
nContaEmail++
cAssunto := oFolder:Items( i ):Subject
cMensagem := oFolder:Items( i ):body

MsgInfo(cMensagem,cAssunto)

//NOVO EMAIL?
if oFolder:Items(i):UnRead()
//MARCAR COMO JÁ LIDO
oFolder:Items(i):UnRead(.f.)
endif

NEXT


return nil
ubiratanmga@gmail.com

FWH24.04
BCC7.3
HARBOUR3.2
xMate
Pelles´C
TDolphin
MGA
 
Posts: 1252
Joined: Mon Feb 25, 2008 2:54 pm
Location: Brasil/PR/Maringá

Previous

Return to FiveWin para Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 54 guests