473,889 Members | 1,927 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

send email without using a macro

86 New Member
Hi. I was wondering if there was a way to send an email without using the Send Object method for a macro. if you use the macro, you will get this warning:

I know in VB .NET you have to import an outlook object or w/e it is and then there were methods that allowed you to edit the To, CC, BCC, subject, etc

I was wondering if there is something similar in VBA to do that.

What i want to do is the following:
1) when user clicks "Send Email" button, it opens up MS Outlook
2) it attaches a report
3) fills out the subject

Aug 1 '11 #1
68 7941
8,834 Recognized Expert Expert
Do you wish to automatically Send the E-Mail or Display the Outlook Screen?
Aug 1 '11 #2
12,516 Recognized Expert Moderator MVP
You can't get around that message if you're trying to use Outlook to send the e-mail. If you're in an enterprise set up and they have SMTP, you could use the CDO object to send the e-mail.
Aug 1 '11 #3
Jeffrey Tan
86 New Member
good question :P

just display the outlook screen before user hits send email.
Aug 1 '11 #4
Jeffrey Tan
86 New Member
i found something that might do it, but i just want to be able to display the email before the user sends it.

** Snip **
Aug 1 '11 #5
Jeffrey Tan
86 New Member
sorry NeoPa.


if im doing this via macro how do i skip a line in the message text field?

Expand|Select|Wrap|Line Numbers
  1. ="Ticket #: " & [Forms]![User Problem Log]![trouble_no] & " -- " & "Brief Problem: " & [Forms]![User Problem Log]![brief_problem]
i tried vbNewLine, but it doesn't work?
Aug 1 '11 #6
32,584 Recognized Expert Moderator MVP
If vbNewLine doesn't work that generally indicates one of two things :
  1. The object doesn't support multiple lines period.
  2. The object uses a vbLineFeed character for separating lines.

Both would surprise me in this case as vbNewLine includes a vbLineFeed character within it, and the email body (being the closest match I can think of to your reference 'message text') does, typically, contain/handle multiple lines of text.
Aug 1 '11 #7
Jeffrey Tan
86 New Member
Yeah neoPa, when I tried vbNewLine, VBA automatically added the [ ] to it. so it must be thinking it's a control or something.

I also have another problem linking a report as an attachment.

the macro opens up a report (Print Single Ticket) and when i try to preview the attachment, the report details for the particular record is not the same. the report somehow picks up the latest record and uses that as an attachment.

I've been scratching my head all over about this. Not sure if it's possible.

Other than that, the macro works fine. Just the attachment of a report that's killing me :)
Aug 2 '11 #8
32,584 Recognized Expert Moderator MVP
Yeah neoPa, when I tried vbNewLine, VBA automatically added the [ ] to it. so it must be thinking it's a control or something.
That sounds more like SQL than VBA. Where are you seeing this exactly?

I'm afraid I'm not really the man to help with your other issues though. I tend to avoid the macro system in Access.
Aug 2 '11 #9
Jeffrey Tan
86 New Member
@NeoPa, it's in the macro called 'Send Object'

These are the following fields
  • Object Type: I selected Report
  • Object Name: report name
  • Output Format: HTML
  • To:
  • Cc:
  • Bcc:
  • Subject:
  • Message Text:
  • Edit Message: No (this is where you allow it to preview or not)
  • Template File: not sure about thsi one
Aug 2 '11 #10

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

Similar topics

by: dave | last post by:
hi guys I m trying to execute few lines code tht i have copies from microsoft tech script centre. basically its to send email without using any smtp service. u can find the code snippet from following link. http://www.microsoft.com/technet/community/scriptcenter/en tscr/scrent16.mspx while executing this code in vbs file i was getting error:
by: jdph40 | last post by:
I'm using Access 97. In the OnClick event of a button I have the code below. I looks at txtEmail and sends an e-mail message without further action from the user (user does not have to click Send as he would if he used DoCmd.SendObject.) However, I want to attach a report in Snapshot format. How would I modify my code to include a report? Thank you, JD
by: Ronny Sigo | last post by:
Hello all, Can anyone tell me how to prevent my mailprog to display the mail, and just send it ? The code I use is below Any help appreciated .. Thanks Ronny Sigo Private Declare Function ShellExecute Lib "shell32.dll" Alias _ "ShellExecuteA" (ByVal hwnd As Long, ByVal lpOperation _
by: Mike | last post by:
In VB6 I could send email via Outlook without using SMTP, Is it possible to do the same in .NET and if so is there any examples of doing this?
by: CLEAR-RCIC | last post by:
I want to send an email from our Intranet site to myself whenever an error happens. Our manager will not let us install SMTP on the web server. Is it possible to send email programatically without SMTP installed?
by: ErwinF | last post by:
Hi there, I would like to know the following: How to send send email attachments using WebDAV in VB .NET? Sample code please................... Thanks for your help.
by: Siv | last post by:
Hi, A little while ago I wrote a small program that allowed the user to view products from a database. The database holds the details of the products which can be viewed via a form and additionally pictures of the product are stored in an images subfolder and the database holds the file name of the relevant picture. The user can then click a button to display the picture in a pop-up window and also another button to email the potential...
by: Boki | last post by:
Hi All, I want to create a program that auto send out email ( not email bomb ) to myself. I tried the MAPI, but it will show a notiifcation message, user need to confirm that. My target is the program can auto send out email for a while ( with a timer, no prob )
by: phill86 | last post by:
Hi I am using the following code to send an email from access via outlook automatically DoCmd.SendObject acSendReport, stDocName, acFormatRTF, "User", , , , , False
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...
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
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,...
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...
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
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();...
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
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
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.