Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Lotus Notes and VFP
Message
De
27/11/2009 12:44:18
 
 
À
26/11/2009 22:16:11
Paul Ong
Knights of Christ Foundation
Californie, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
Programmation Orientée Object
Versions des environnements
Visual FoxPro:
VFP 8
OS:
Windows XP SP2
Database:
Visual FoxPro
Application:
Desktop
Divers
Thread ID:
01436703
Message ID:
01436762
Vues:
67
I tried to write a replacement for Bloated Goats .. errr... Lotus Notes several years ago and finally gave up. IBM doesn't expose enough control through the COM interface. You can almost get there, but the API is missing some key functionality.

>hi guys and gals,
>
>got this piece of code and honestly it does the trick, only to realize that the LN should be up and running. my ? is that, is there a way to automate lotus notes even if its not running? can someone help me point to the salvation road? thanks in advance
>
> LOCAL lcSubject , lcReceipient, lcBodyText, llSaveIt
> LOCAL loSession , loMailDB , loMailDoc
> LOCAL lcServer , lcMailFile , loRichText, loAttachment
>
> *-- Set Variaibls for mail
> lcSubject = "Test Notes Email from VFP"
> lcReceipient = "its-ra_saci.sm.ho@sm-shoemart.com"
> lcBodyText = "This is the main message of the Email"
> llSaveIt = .F.
>
> *--------------- Notes Automation ------------------
> loSession = CreateObject("Notes.NotesSession")
>
> lcServer = loSession.GetEnvironmentString("MailServer",.T.) && Causes Notes To Ask for Auth
> lcMailFile = loSession.GetEnvironmentString("MailFile",.T.) && Causes Notes To Ask for Auth
>
> *-- Open the mail database in notes
> loMailDB = loSession.GetDatabase(lcServer,lcMailFile)
>
> *-- If Mail Database not open, open it.
> IF !loMailDB.IsOpen
> loMail.OpenMail()
> ENDIF
>
> *-- Setup new Mail Document.
> loMailDoc = loMailDB.CreateDocument() && Causes Notes To Ask for Auth
> WITH loMailDoc
> .Form = "Memo"
> .SendTo = lcReceipient
> .Subject = lcSubject
> .Body = lcBodyText
> .SaveMessageOnSend = llSaveIt
>
> loRichText = .CreateRichTextItem("loAttachment")
> loAttachment = loRichText.EmbedObject(1454,"","c:\autoexec.bat")
>
> *-- Send the Document
> .PostedDate = DATE()
> .Send(0)
> ENDWITH
>
> loMailDoc = .NULL.
> loMailDB = .NULL.
> loSession = .NULL.
Craig Berntson
MCSD, Microsoft .Net MVP, Grape City Community Influencer
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform