Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I wanted to email a chart from excel via Lotus Notes and it is easy to
set up using the uidocument process in Lotus Notes. However I have not found a way of closing the uidocument from vba. This code is a way around the problem because it does not involve uidocument. ActiveSheet.ChartObjects("Chart 122").Activate ActiveChart.ChartArea.Select 'ActiveSheet.ChartObjects("chart 122").Select strGIFFileName = "d:\graff1.gif" Selection.Parent.Export Filename:=strGIFFileName Set s = CreateObject("Notes.NotesSession") Set db = s.GetDatabase("", "d:\notes\dgb1.nsf") Set stream = s.CreateStream s.ConvertMime = False Set doc = db.CreateDocument Set body = doc.CreateMIMEEntity Set header = body.CreateHeader("Subject") Call header.SetHeaderVal("Subject......") Set header = body.CreateHeader("To") Call header.SetHeaderVal("address.....") Set stream = s.CreateStream If Not stream.Open("D:\graff1.gif", "binary") Then GoTo ExitSub End If If stream.Bytes = 0 Then GoTo ExitSub End If Call body.SetContentFromBytes(stream, "image/gif", ENC_IDENTITY_BINARY) Call stream.Close Call doc.Save(True, True) Call doc.Send(False) ExitSub: s.ConvertMime = True ' Restore conversion End Sub |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
How do I send an Excel workbook through Lotus Notes Email? | Excel Discussion (Misc queries) | |||
?? Email Excel sheet thru Lotus Notes | Excel Discussion (Misc queries) | |||
??email excel sheet w Lotus notes | Excel Discussion (Misc queries) | |||
excel close everytime I receive an email with lotus notes 6.5.5 | Excel Discussion (Misc queries) | |||
Excel VBA to send email using Lotus Notes | Excel Programming |