Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Lotus Notes and VFP
Message
De
27/11/2009 13:01:38
 
 
À
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:
01436764
Vues:
64
Hi,

I assume you're referring to the Notes server since (AFAICR) the "CreateObject("Notes.NotesSession")" should create the client session OK.

If you are referring to the server and if it's not running then there's not much you can do about it :-{

Regards,
Viv

>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.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform