|
[x]
Posted via EE Mobile
|
||
Search, ask, and monitor your questions on the go with EE Mobile. Visit Experts Exchange from your mobile device and never be out of touch again. |
||
| Question |
|
[x]
Attachment Details
|
||
|
[x]
The Solution Rating System
|
||
With so many solutions, how can you tell which solutions are most likely to help you and which ones are not? To provide you with a tool to use, we rate our solutions based on various elements that most accurately determine if a solution is a quality solution. To explain what factors affect the solution rating, here are the elements we take into consideration when formulating our solution rating.
Your Input Matters If you have any suggestions that you would like to make for our rating system, please ask a question in the Suggestions Zone of Community Support. Thank you! |
||
1: 2: 3: 4: 5: 6: 7: 8: 9: 10: 11: 12: 13: 14: 15: 16: 17: 18: 19: 20: 21: 22: 23: 24: 25: 26: 27: 28: 29: 30: 31: 32: 33: 34: 35: 36: 37: 38: 39: 40: 41: 42: 43: 44: 45: 46: 47: 48: 49: 50: 51: 52: 53: 54: 55: 56: 57: 58: 59: 60: 61: 62: 63: 64: 65: 66: 67: 68: 69: 70: 71: 72: 73: 74: 75: 76: 77: 78: 79: 80: 81: 82: 83: 84: 85: 86: 87: 88: 89: 90: 91: 92: 93: 94: 95: 96: 97: 98: 99: 100: 101: 102: 103: |
Sub SendTradeEmailNotes(subject, too, cc, bcc, htmlpath, Tickers() As String)
Dim session As Object
Dim MailDb As Object
Dim MailDoc As Object
Dim oAttachME As Object
Dim oEmbedObj As Object
Dim uiWS As Object
Dim uiDoc As Object
Dim parent As NotesMIMEEntity
Dim Child() As NotesMIMEEntity
Dim header As NotesMIMEHeader
Dim stream As NotesStream
Dim doc As NotesDocument
Dim collection As NotesDocumentCollection
Dim View As NotesView
Dim uiView As NOTESUIVIEW
Dim i, j, X, Childs, response, lngError, rtitem, UNID
Set session = CreateObject("Lotus.NotesSession")
Call session.Initialize
Set MailDb = session.GetDbDirectory("Accout").OpenMailDatabase
If MailDb.IsOpen = True Then
'Already open for mail
Else
Call MailDb.Open
End If
Set doc = MailDb.CreateDocument
Call doc.ReplaceItemValue("Form", "Memo")
Call doc.ReplaceItemValue("Subject", subject)
' Create all the Entities - one parent, X children depending on number of attachments
Set parent = doc.CreateMIMEEntity
Childs = UBound(Tickers()) + 1
ReDim Child(1 To Childs)
Set Child(1) = parent.CreateChildEntity
' Add a couple of headers to child 2 (that will hold the attachment).
j = UBound(Tickers())
For i = 1 To j
' Bring the attachment into its entity (child 2)
Set stream = session.CreateStream
If FileOrDirExists("C:\" & Tickers(j - i + 1) & " Trades.txt") Then
Set Child(i + 1) = parent.CreateChildEntity(Child(i))
Set header = Child(i + 1).CreateHeader("Content-Transfer-Encoding")
Call header.SetHeaderVal("binary")
Set header = Child(i + 1).CreateHeader("Content-Disposition")
Call header.SetHeaderVal("attachment; filename=" & Tickers(j - i + 1) & " Trades.txt")
X = stream.Open("C:\" & Tickers(j - i + 1) & " .txt", "binary")
Call Child(i + 1).SetContentFromBytes(stream, "text/plain", ENC_NONE)
Call Child(i + 1).EncodeContent(ENC_IDENTITY_8BIT)
Call stream.Close
End If
Next i
Call doc.AppendItemValue("Form", "Memo")
doc.Save True, True
UNID = doc.UniversalID
Set uiWS = CreateObject("Notes.NotesUIWorkspace")
Set uidoc = uiws.EDITDOCUMENT(True, doc) '<---------------Error Here!!!
X = Shell("C:\Program Files\Lotus\Notes\notes.exe", vbNormalFocus)
Call uiDoc.GOTOFIELD("To")
Call uiDoc.InsertText(too)
Call uiDoc.GOTOFIELD("EnterCopyTo")
Call uiDoc.InsertText(cc)
Call uiDoc.GOTOFIELD("Subject")
Call uiDoc.InsertText(subject)
Call uiDoc.GOTOFIELD("Body")
Call uiDoc.GOTOBOTTOM
Call uiDoc.Import("HTML File", htmlpath)
Call uiDoc.GOTOFIELD("Body")
Call uiDoc.GOTOTOP
Set doc = Nothing
Set session = Nothing
Set MailDb = Nothing
Set MailDoc = Nothing
Set oAttachME = Nothing
Set oEmbedObj = Nothing
Set uiWS = Nothing
Set uiDoc = Nothing
End Sub
|
Advertisement
| Hall of Fame |