Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Lotus Notes - Login Help
Message
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
COM/DCOM et OLE Automation
Titre:
Lotus Notes - Login Help
Divers
Thread ID:
00331117
Message ID:
00331117
Vues:
62
I'm trying to send info from a VFP form via Lotus Notes...code follows:
DIMENSION recipients(1)
recipients(1)="Phil Thomas"

SESSION=CREATEOBJECT("NOTES.NOTESSESSION")

m.mailfile=SESSION.GetEnvironmentString("MailFile",.T.)
m.MailServer=SESSION.GetEnvironmentString("MailServer",.T.)

DB=SESSION.GetDatabase(M.MailServer,m.mailfile)

DOC=DB.CreateDocument()

DOC.FORM="Memo"

DOC.Subject="Subject"
DOC.Body="Text"
DOC.SEND(.F.,recipients)
DOC.SaveMessageOnSend = .T.
It works fine as long as the user is already logged onto Notes. Attempting this before logging in results in the error "OLE Dispatch exception code 7063 from ?:Database CN=(Database name)has not been opened yet"

My preference would be to check for Notes being available before allowing the user to run the code - anyone have suggestions? For now I stuck in a messagebox reminding them to log in before pressing OK....

TIA
Phil Thomas
http://phillipdthomas.com

Never let your energy or enthusiasm be dampened by the discouragements that must inevitably come.....
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform