PLEASE SOMEONE HELP ME... Ok-- i wrote a Visual Basic NT Service that is reading from MSMQ.. Which then turn around (within the same program..) sends the information to our lotus notes fax server. I have written it to be "asyn multl thread..".
Our Lotus notes guys have set up the Notes server to re-route everything that has "ANY NAME@555.555.5555@FAX" to the FAX Server. This part works well -- does not fail! All corresponding faxes are sent correctly with a cover sheet and pdf attacement.. Cover sheet says 3 pages including cover sheet.. The cover sheet is 1, the blank page is 2 and the pdf attachment is 3. This blank page is the problem. I AM NOT SETTING (ReplaceItemValue) ANYwhere to the body. No value are set what so ever to body.. Below is a the ENTIRE function call within the VB
****start function ********************
Public Sub SendNotesMail(ByVal subject1 As String, ByVal subject2 As String, ByVal attachment As String, ByVal recipient As String, ByVal faxfrom As String, ByVal retfax As String, ByVal faxcover As String, ByVal saveit As Boolean)
'Set up the objects required for Automation into lotus notes
Dim objLNDatabase As Domino.NotesDatabase ' The Database object
Dim objLNDocument As Domino.NotesDocument ' The Document object
Dim AttachME As Object 'The attachment richtextfile object
Set objLNDatabase = m_objLNSession.GetDatabase("***", "mail***.nsf")
If objLNDatabase.IsOpen = True Then
'Already open for mail
Else
objLNDatabase.Open
End If
'Set up the new mail document
Set objLNDocument = objLNDatabase.CreateDocument
'pass all corresponding values to notes document
objLNDocument.ReplaceItemValue "subject", Trim(subject1)
objLNDocument.ReplaceItemValue "IS_FaxOutSendersAddress1", Trim(subject2)
objLNDocument.ReplaceItemValue "NFX_FaxOutCoverPageName", Trim(faxcover)
objLNDocument.ReplaceItemValue "NFX_FaxOutSenderName", Trim(faxfrom)
objLNDocument.ReplaceItemValue "IS_FaxOutReturnFaxNumber", Trim(retfax)
'this has to be set to false -- if not an error is returned
objLNDocument.SaveMessageOnSend = saveit
'Set up the embedded object and attachment and attach it
If attachment <> "" Then
Set AttachME = objLNDocument.CreateRichTextItem("Attachment")
AttachME.EmbedObject 1454, "", Trim(attachment), "Attachment"
Call objLNDocument.Save(True, True)
End If
'Send the document
objLNDocument.Send 0, Trim(recipient)
'clean up (delete) attachment file
Set objFile = objFSO.GetFile(attachment)
'validate object
objFile.Delete True
'Clean Up lotus notes objects
Set objLNDocument = Nothing
Set objLNDatabase = Nothing
Set AttachME = Nothing
End Sub
Software/Hardware used:
ASKED:
December 6, 2005 1:25 PM