× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



Gregg, below is the code. So far it's working great. It returns all ID 
files on a users PC. There have been a few instances where it triggered an 
ECL alert. It also assumes the user has access to create objects on their 
C drive.

If I get an empty email in return I know I need to investigate that user. 

If the user doesn't see the button then they aren't using a notes client 
(and instead are using web access, a thin client or outlook etc...). They 
are instructed to notify me if this happens.

Regardless I get either a backup of their ID file or a clue that I need to 
have their notes config investigated and a backup via another means.




Sub Click(Source As Button)
        Dim session As New NotesSession
'Get location of *id files
        DataDir = session.GetEnvironmentString( "Directory", True ) & "\" 
 
        Dim tempDrive As String
        tempDrive$ = Curdrive$()
        If tempDrive$ <> "C:" Then 
                Chdrive "C"
        End If
        Chdir "C:\"
        On Error Resume Next 
        Rmdir "C:\ID_BACKUP"
        Mkdir "ID_BACKUP"
'       Loop to get all id files ie Filecopy "C:\LOTUS\NOTES\DATA\*.id", 
"C:\ID_BACKUP\*.id" 
        tmp = Dir$(DataDir & "*.id")
        While Not tmp = "" 
                If tmp <> "ADMIN.ID" And tmp <> "CERT.ID" And tmp <> 
"user.id" And tmp <> "USER.ID" Then
                        Filecopy DataDir & tmp, "C:\ID_BACKUP\" & tmp
                End If
                tmp = Dir$ 
        Wend
 
        Dim db As NotesDatabase
        Dim body As NotesRichTextItem
 
        Set db = session.CurrentDatabase
        Set memo = db.CreateDocument
        memo.Form = "Memo" 'the standard form name for an email document
        Set body = memo.CreateRichTextItem("Body") 'the standard name for 
the field to hold the message
        memo.Subject = "Here is my ID File"
        memo.SendTo = "gkern@xxxxxxxxxxxxxxxx"
        memo.CopyTo = "gkern@xxxxxxxxxxxxxxxx"
 
'now we add the content of the message
        Call body.AppendText("Here is a copy of my ID file.")
        Call body.AddNewline(2) 'create a new paragraph with an extra 
blank line 
        Call body.AppendText("Put it in a safe place.")
 
'Loop to get all id files ie Filecopy "C:\LOTUS\NOTES\DATA\*.id", 
"C:\ID_BACKUP\*.id" 
        tmp = Dir$(DataDir & "*.id")
        While Not tmp = "" 
                If tmp <> "ADMIN.ID" And tmp <> "CERT.ID" And tmp <> 
"user.id" And tmp <> "USER.ID" Then
                        Call body.AddNewline(2)
                        Call body.EmbedObject(EMBED_ATTACHMENT, "", 
"C:\ID_BACKUP\" &tmp, "")
                End If
                Kill "C:\ID_BACKUP\" &tmp
                tmp = Dir$ 
        Wend
'send return email with the id files as attachments
        Call memo.Send(False) 
 
        Rmdir "ID_BACKUP"
        Messagebox " Thank You - You may now delete this email message.   
" , 0  + 64 +0 + 0, "ID Backup Completion"
 
End Sub

Regards, Jerry

Gerald Kern - MIS Project Leader
Lotus Notes/Domino Administrator
IBM Certified RPG IV Developer
The Toledo Clinic, Inc.
4235 Secor Road
Toledo, OH 43623-4299
Phone 419-479-5535
gkern@xxxxxxxxxxxxxxxx


This e-mail message, including any attachments, is for the sole use of the 
intended recipient(s) and may contain confidential and privileged 
information. Any unauthorized use, disclosure or distribution is 
prohibited. If you are not the intended recipient, please inform the 
sender by reply e-mail and destroy this and all copies of this message.

As an Amazon Associate we earn from qualifying purchases.

This thread ...


Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.