473,695 Members | 2,730 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

How did I add a 'Snapshot' attachment & email it Via Lotus Notes

5 New Member
Hi All

I need to email a report (with contains graphs) via Lotus Notes. I've tried the 'SendObjectSnp' method (which works with some Lotus Notes clients (but not many others)); so I used the code below: -

Public Sub SEND_EMAILS()

Dim session As Object
Dim db As Object
Dim doc As Object
Dim rtitem As Object
Dim rtitem_rtf As Object
Dim t_rpt_Name As String

Set session = CreateObject("N otes.NotesSessi on")
Set db = session.Current Database
Set doc = db.CreateDocume nt

'output report to text file on C:\

DoCmd.OutputTo acOutputReport, rpt_Name, acFormatSNP, ("C:\" & rpt_Name), False

doc.Form = "Memo"
doc.SendTo = temp_ccList
doc.subject = subject
doc.Body = Message


'Attach Doc 1
Set rtitem = doc.CreateRichT extItem("Attach ment")
Call rtitem.EMBEDOBJ ECT(1454, "", "C:\" & rpt_Name)
Call rtitem.ADDNEWLI NE(1, True)


This appears to attach a Richtext version of the report (rather than a snapshot) to the email, & sends it via Lotus Notes. However, if I try to open the attachment, SNAPSHOT doesn't recognise it; strangley I can view just the text part of the attachment if I just 'View' it within lotus notes.

How can I attach the report attachment so snapshot can open it (from Lotus Notes)?


Thanks in advance

Mark
Dec 13 '07 #1
2 3965
Dököll
2,364 Recognized Expert Top Contributor
Hi All

I need to email a report (with contains graphs) via Lotus Notes. I've tried the 'SendObjectSnp' method (which works with some Lotus Notes clients (but not many others)); so I used the code below: -
Expand|Select|Wrap|Line Numbers
  1. Public Sub SEND_EMAILS()
  2.  
  3. Dim session As Object
  4. Dim db As Object
  5. Dim doc As Object
  6. Dim rtitem As Object
  7. Dim rtitem_rtf As Object
  8. Dim t_rpt_Name As String
  9.  
  10. Set session = CreateObject("Notes.NotesSession")
  11. Set db = session.CurrentDatabase
  12. Set doc = db.CreateDocument
  13.  
  14. 'output report to text file on C:\
  15.  
  16. DoCmd.OutputTo acOutputReport, rpt_Name, acFormatSNP, ("C:\" & rpt_Name), False
  17.  
  18. doc.Form = "Memo"
  19. doc.SendTo = temp_ccList
  20. doc.subject = subject
  21. doc.Body = Message
  22.  
  23.  
  24. 'Attach Doc 1
  25. Set rtitem = doc.CreateRichTextItem("Attachment")
  26. Call rtitem.EMBEDOBJECT(1454, "", "C:\" & rpt_Name)
  27. Call rtitem.ADDNEWLINE(1, True)
  28.  
This appears to attach a Richtext version of the report (rather than a snapshot) to the email, & sends it via Lotus Notes. However, if I try to open the attachment, SNAPSHOT doesn't recognise it; strangley I can view just the text part of the attachment if I just 'View' it within lotus notes.

How can I attach the report attachment so snapshot can open it (from Lotus Notes)?


Thanks in advance

Mark
Hello MarkStorer!

Do youy mean firing a button that add an attachment to the body of a Notes email? Below VBA code which I use rather frequently, helps add such attachment, if you have Notes running:

Expand|Select|Wrap|Line Numbers
  1. Private Sub EmailAttachment_Click()
  2. On Error GoTo Err_MailMeReport_Click
  3.     Dim stDocName As String
  4.     Dim stPersonName As String
  5.     stDocName = "YourData" 'form being added to email
  6.     stPersonName = AssignedTo 'field that pulls email recipient
  7.     DoCmd.SendObject acForm, stDocName, , AssignedTo, , , "Please take a look, what are your thoughts?"
  8. Exit_MailMeReport_Click:
  9.     Exit Sub
  10. Err_MailMeReport_Click:
  11.     MsgBox "You have chosen to cancel the email", vbInformation + vbOKOnly, _
  12.                "Data Central" 'Err.Description
  13.     Resume Exit_MailMeReport_Click
  14. End Sub
  15.  
You will therefore have the option of adding as Snapshot or else...

Try it!
Dec 16 '07 #2
MarkStorer
5 New Member
Hi Dököll

Thanks for your reply !

I've tried your code & it works a treat for outlook - I will use it in future applications if you don't mind ;-)

However the SendObject method is unreliable for LotusNotes clients (for some clients, it works & for others, it doesn't) the only methodolgy I've known to be reliable are variations of the script I've posted (which is basically a script released from this excellent forum).

However I've not found a LotusNotes-reliable script which can send anything other than an rtf format - unfortunately I need to send a snapshot (or PDF I guess) as I have a graph in my attachment the rtf format doesn't display graphics.

Any thoughts ?

Cheers

Mark
Dec 17 '07 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

2
3776
by: bruce | last post by:
I can send an email from any client (outlook, lotus notes), and fill it with all sorts of fonts (bold, courier, etc). When the mail is received, the client reads it inline, not as an attachment. When I send an html email thru my Visual Basic program (using standard SMTP protocol), it is received as an attachment. How can I get it so that it is read inline? Thanks, Bruce Brodinsky
7
5630
by: ursus | last post by:
Hi This is my second try... any takers? I have an application that is up and running. Everything is working perfectly. The application is written in VB 6 SP5 using Access 2000 to store the data. The users would now like to attach files (Word, Excel, etc) to the records. I have no idea how to go about this :o( I am a Lotus Notes
88
12497
by: Mike | last post by:
Is there a way to determine what a user's default email client is? I read a post from 3 years ago that said no. I guess I'm hoping something has come along since then.
0
5607
by: PZ Fosbeck | last post by:
I'm not a Lotus Notes developer but thanks to this group's archives have successfully created a function for sending Lotus Notes emails from Access. The follow code works great except I want to remove my name from the 'Sent By' portion of the email. These messages are sent using my client session of Lotus Notes, using a database called 'Tech Team' The resulting email message headers contains (Bold, the From name) 'Tech Team'
1
2086
by: John Taylor | last post by:
I have some simple code behind a control button - basically prints a report and send the report (in snapshot format) to lotus notes for e-mailing. The code worked fine for ages and all of a sudden the attachment to Lotus Notes has an *.xls extension and not a *snp extension. I haven't done anything to my PC it just happened!! The "fix" is to copy the attachment to my desctop, rename it with the correct extension (.snp) and re attach it...
3
8263
by: =?Utf-8?B?SmFtZXNU?= | last post by:
I can create a message and send it via my btopenworld account but is the method the same when using Lotus Notes. I have no experience of Lotus Notes whatsoever. I have never seen it at all. the code I am using is: dim smtp as new smtpclient dim message as new mailmessage( from@cc.com, to@dd.com) message.subject = "test"
0
3478
by: =?Utf-8?B?U293bXlh?= | last post by:
Hello, I would like to know how we can read the notes database in .C# .net. I tried the following mechanism.by which am unable to open the Database. NotesSession notesSession = new NotesSession(); notesSession.Initialize("ABC1234"); notesDB = notesSession.GetDatabase("local", "d:\lotus\notes\data\New\Como.nsf",true); if(!notesDB.IsOpen)
0
1785
by: kohligagan2 | last post by:
Hi, I am working on a scenario . And scenario is I am trying to send an Email using my Lotus notes Client Id ( Lotus notes :- is used for messaging and sending mails work as a middleware) I have an ASP .NET website running on a IIS Server with Lotus note is running at the machine where server is running. One client sends the request to the server and correspondingly mail goes to the respective person as mentioned. I am using a...
0
8617
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8553
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9112
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
8822
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8815
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
5827
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4570
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2994
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
1970
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.