Manage Learn to apply best practices and optimize your operations.

E-Mailing A Database To A User

If your users are like our user, getting them to add a new replica copy to
their desktop is a major phone call. And E-Mailing a large database is not the
answer. E-Mail then a Database Shell! After you have created a new Replica
Copy but before you replicate, you will have a Database shell or (Blank Icon)
on your desktop. it is about 176K bytes in size. Attach that shell to an E-Mail
and send that to your user. Have them Detach to the Notes Data directory and
then replicate it with the home server. One Step better!! Add a button to the
e-mail with the following Script and the button will load it to the proper
location for them.
You can also set the replication setting of the shell before you send it.
Sub Click(Source As Button)
Dim session As New notessession
Dim ws As New notesuiworkspace
Dim uidoc As notesuidocument
Dim doc As notesdocument
Dim object As notesembeddedobject
Dim filename As String
Dim rtitem As Variant
Dim pathName As String

path = session.GETENVIRONMENTSTRING("Directory",True)
Call session.SETENVIRONMENTVAR("FileDlgDirectory",path,True)

Set uidoc = ws.currentdocument
Set doc = uidoc.document
Set rtitem = doc.getfirstitem("Body")
If(rtitem.type = RICHTEXT) Then
Forall o In rtitem.Embeddedobjects
If ( o.type = EMBED_ATTACHMENT ) Then
pathName$ = path & "\" & o.source
fileName$ = Dir$(pathName$, 0)
If fileName$ = "" Then
Call o.extractfile( path & "\" & o.source )
Messagebox "The Database(s) " & filename$ & " is already on your System.
End If

Call ws.adddatabase("",o.source)
End If
End Forall
End If
Messagebox "The Database(s) have been added to your Desktop. Please Replicate
before using.",64,"Finished"

End Sub

Dig Deeper on Domino Resources - Part 4

Start the conversation

Send me notifications when other members comment.

Please create a username to comment.




  • iSeries tutorials's tutorials provide in-depth information on the iSeries. Our iSeries tutorials address areas you need to know about...

  • V6R1 upgrade planning checklist

    When upgrading to V6R1, make sure your software will be supported, your programs will function and the correct PTFs have been ...

  • Connecting multiple iSeries systems through DDM

    Working with databases over multiple iSeries systems can be simple when remotely connecting logical partitions with distributed ...