Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Access and Lotus Notes and Outlook (Office 2013)

Posted on 2016-10-05
11
Medium Priority
?
45 Views
Last Modified: 2016-10-15
I'm changing over from Lotus Notes to Outlook 2013. Using Access 2013.
Unfortunately I do not have Notes available to see how it worked. I need to mimic the same in Outlook as it did in Notes.
I was told that the emails we're automatically sent i.e. When the user picked the function it sent the email and did not bring it up (.DISPLAY) for review or like a draft. But in the old code for notes every place where the email is generated it states .SEND FALSE
I would assume it should be  .SEND TRUE  or is there a difference in Notes and Outlook? And if so what makes the Notes display and not send an email?

Any help is appreciated.
0
Comment
Question by:Chuck Lowe
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 6
  • 4
11 Comments
 
LVL 46

Expert Comment

by:Sjef Bosman
ID: 41830062
You'll have a very hard time to mimic Notes in Outlook, getting close will already be very difficult. They are just completely different (mail) environments. That said, how can we help?

I don't quite understand what functionality you need to have in Outlook. Are you talking about an application? Ah, in Access... I think I get it. You have an Access application that you now want to send mails through Outlook?

In Notes, using LotusScript and also VB, you can prepare a mail in the background and send it out using .SEND. The parameter FALSE only indicates that the form should not be sent with the data (sending the form is a Notes feature, in case the receiving party doesn't have the form in their database).

In Notes, you can also prepare a mail in the foreground (using VB) and let the user send it. In that case the user can see the draft mail.

Implementation-wise the background objects to use are NotesSession, NotesDatabase and NotesDocument, whereas the foreground objects would be NotesUIWorkspace, NotesDatabase and NotesUIDocument.

Do you already have sample code for sending a mail in Outlook?
0
 

Author Comment

by:Chuck Lowe
ID: 41831904
Thanks. I see the difference between the foreground and background emails.
This gave me my answer and I know what do to now.

Thanks.
0
 
LVL 31

Expert Comment

by:Helen Feddema
ID: 41831913
Here is some simple code to create and send an email from Access (for the final version, comment out the Display line and uncomment the Send line):

Private Sub SendMailAttachment_Click()
'Created by Helen Feddema 5-19-2000
'Last modified 19-Jan-2010

On Error GoTo ErrorHandler

   Dim appOutlook As New Outlook.Application
   Dim itm As Outlook.MailItem

   'Create new mail message and open it for review before sending
   Set itm = appOutlook.CreateItem(olMailItem)
   With itm
      .To = "John Doe"
      .Subject = "Contacts file you requested"
      .Body = "Email body text"
      .Display
      '.Send
   End With
   
ErrorHandlerExit:
   Exit Sub

ErrorHandler:
   MsgBox "Error No: " & Err.Number & "; Description: " & Err.Description
   Resume ErrorHandlerExit

End Sub

Open in new window

0
Microsoft Certification Exam 74-409

Veeam® is happy to provide the Microsoft community with a study guide prepared by MVP and MCT, Orin Thomas. This guide will take you through each of the exam objectives, helping you to prepare for and pass the examination.

 

Author Comment

by:Chuck Lowe
ID: 41831964
@Helen
Thanks. I had that code already. My issue was figuring out how Notes was sending emails.
It works differently than Outlook does as it's not as simple as switching between .Display and .Send being set for the email to be sent automatically or staying on the screen (as a draft) for the user to review and/or change before sending.

We also have another issue that IT set up a Group Policy that won't let us send emails automatically. Our work around was to use SENDKEYS with CTRL + ENTER. I did find however that in that case I did need the .DISPLAY otherwise the emails did not send and it did not give an error as such. I also had to add a wait of 100 milliseconds (seemed to be working) between the .DISPLAY and SENDKEYS otherwise the email (when sending multiples in a loop) stayed on the screen as a draft. Some info for others in case they need a work around.
But thanks again.

-Chuck
0
 

Accepted Solution

by:
Chuck Lowe earned 0 total points
ID: 41836788
@All
I was able to get to the registry and make the necessary change.
Thanks everyone for their answers.
0
 
LVL 46

Expert Comment

by:Sjef Bosman
ID: 41836955
So that's how you "appreciate any help" ... ;-)
0
 

Author Comment

by:Chuck Lowe
ID: 41836966
@Sjef
I found the answer myself! I thanked everyone for their answers! How else should I have done it?
0
 
LVL 46

Expert Comment

by:Sjef Bosman
ID: 41837115
Aaah, well now... you could have assigned points to valuable contributions. The questions you asked were: "I would assume it should be  .SEND TRUE  or is there a difference in Notes and Outlook? And if so what makes the Notes display and not send an email?" and that's what I responded to. The solution you propose is to the unasked question about your Group Policy, which isn't in the title of the question nor in its contents.

It's often so hard for us to guess right...

Let me just say that I'm glad you found a solution. :-)
0
 

Author Comment

by:Chuck Lowe
ID: 41837139
@Sjef
If you look closely the GROUP Policy was a second part and not of the original question which no one commented on.

I'm sorry if I hurt any body's feelings!
0
 
LVL 46

Expert Comment

by:Sjef Bosman
ID: 41837590
Don't worry, my feelings didn't get hurt. It's just that I think I did look closely and I did comment on your original question. It might simply be the fact that English isn't my first language...

See you next question!
0
 

Author Closing Comment

by:Chuck Lowe
ID: 41844866
I found the answer myself.
0

Featured Post

[Webinar] Lessons on Recovering from Petya

Skyport is working hard to help customers recover from recent attacks, like the Petya worm. This work has brought to light some important lessons. New malware attacks like this can take down your entire environment. Learn from others mistakes on how to prevent Petya like worms.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

It’s the first day of March, the weather is starting to warm up and the excitement of the upcoming St. Patrick’s Day holiday can be felt throughout the world.
You need to know the location of the Office templates folder, so that when you create new templates, they are saved to that location, and thus are available for selection when creating new documents.  The steps to find the Templates folder path are …
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…

636 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question