J
Jason
I'd like to open a form using code and have the form act
like an input box. What I want to do is pass the value of
from a control to a string variable in the code. How do I
write this code?
Here's what I have. I'd like to open the form at the
beginning so I can allow the user to add comments to the e-
mail.
Thanks in advance,
Jason
Private Sub cmdRequestApproval_Click()
'Create some object variables for the various Notes objects
Dim NotesDB As Object
Dim NotesDoc As Object
Dim NotesRTF As Object
Dim NotesSession As Object
Dim Response, txtCARID
txtCARID = Forms!frmCAR!CARID
'Use Create object to instantiate a Notes
session object
Set NotesSession = CreateObject
("Notes.Notessession")
'Instantiate NotesDB object from method off
NotesSession
Set NotesDB = NotesSession.getdatabase("", "")
NotesDB.openmail
'Create new Notes document
Set NotesDoc = NotesDB.createdocument
'Not quite sure how these function work, but
seems to suggest that they are replacing textual
'values in the Document object wiht
corresponding E-Mail Address and Subject strings
Call NotesDoc.replaceitemvalue
("Sendto", "Jason E Mitchell")
Call NotesDoc.replaceitemvalue("Subject", "CAR
#" & txtCARID & " needs your approval")
'Send the e-mail
Call NotesDoc.Send(False)
'Destroy the Notes objects
Set NotesSession = Nothing
End If
End If
End Sub
like an input box. What I want to do is pass the value of
from a control to a string variable in the code. How do I
write this code?
Here's what I have. I'd like to open the form at the
beginning so I can allow the user to add comments to the e-
mail.
Thanks in advance,
Jason
Private Sub cmdRequestApproval_Click()
'Create some object variables for the various Notes objects
Dim NotesDB As Object
Dim NotesDoc As Object
Dim NotesRTF As Object
Dim NotesSession As Object
Dim Response, txtCARID
txtCARID = Forms!frmCAR!CARID
'Use Create object to instantiate a Notes
session object
Set NotesSession = CreateObject
("Notes.Notessession")
'Instantiate NotesDB object from method off
NotesSession
Set NotesDB = NotesSession.getdatabase("", "")
NotesDB.openmail
'Create new Notes document
Set NotesDoc = NotesDB.createdocument
'Not quite sure how these function work, but
seems to suggest that they are replacing textual
'values in the Document object wiht
corresponding E-Mail Address and Subject strings
Call NotesDoc.replaceitemvalue
("Sendto", "Jason E Mitchell")
Call NotesDoc.replaceitemvalue("Subject", "CAR
#" & txtCARID & " needs your approval")
'Send the e-mail
Call NotesDoc.Send(False)
'Destroy the Notes objects
Set NotesSession = Nothing
End If
End If
End Sub