473,854 Members | 1,760 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
68 7939
32,584 Recognized Expert Moderator MVP
I would say one of the very few real benefits introduced in 2007 was the acFormatPDF option.
Aug 4 '11 #41
Jeffrey Tan
86 New Member
@NeoPa: I definitely agree...

I don't like the tabs on top and it makes finding things a lot harder...

if MS kept with one UI and just changed some features, everyone would be happy :D

Now I can use this docmd.outputto for my other reports and attach em as PDFs :D.

Thanks everyone who helped me once again!
Aug 4 '11 #42
32,584 Recognized Expert Moderator MVP
if MS kept with one UI and just changed some features, everyone would be happy :D
So happy in fact, that far fewer would be bothering to keep up with buying all the new releases ;-)
Aug 4 '11 #43
Jeffrey Tan
86 New Member
@NeoPa or @ADezii

i am having problems sending the email from my windows xp laptop. i installed office 2007 and converted the database to 2007. my colleague tried it on his windows 7 desktop and was able to send the email.

When i open access 2007 and open up the form and click on the email button, i get the following error:

Run-time erro '2282':
The format in which you are attempting to output the current object is not available.

anyone know what this means?

Aug 4 '11 #44
8,834 Recognized Expert Expert
  1. Make sure that your Output Format is set to:
    Expand|Select|Wrap|Line Numbers
    1. acFormatPDF
  2. Referring to your prior attempts in Attaching the *.htm Files, try changing all occurrances of .htm in the Code to .html.
Aug 4 '11 #45
Jeffrey Tan
86 New Member

yeah i changed them all to acFormatPDF, but weird how im still getting an error..

i was thinking it could be a missing reference, but i checked the references my collegue has and it's the same.
Aug 4 '11 #46
32,584 Recognized Expert Moderator MVP
If that doesn't enable you to find it by yourself, post the current code and indicate which line triggers the error.
Aug 4 '11 #47
Jeffrey Tan
86 New Member
Expand|Select|Wrap|Line Numbers
  1. If FileExists(strDestination & title & [Forms]![User Problem Log]![trouble_no] & "*") Then
  2.         Kill strDestination & title & [Forms]![User Problem Log]![trouble_no] & "*"
  3.         DoCmd.OutputTo acOutputReport, "Email-" & Mid(strReportName, 1, 6), acFormatPDF, strDestination & _
  4.                 "\" & strReportName & ".pdf", False
  5.      Else
  6.          DoCmd.OutputTo acOutputReport, "Email-" & Mid(strReportName, 1, 6), acFormatPDF, strDestination & _
  7.                 "\" & strReportName & ".pdf", False
  8.      End If
line #6-7... when i click on the button to email, it just breaks on that line...

it's weird since i have adobe acrobat installed, pdf writer and all that.
Aug 4 '11 #48
12,516 Recognized Expert Moderator MVP
Did you make sure you have the folder "C:\Documen ts and Settings\jtan\D esktop\Files\" on your laptop?

Also, in your code, you have strDestination & "\". Which means you get "C:\Documen ts and Settings\jtan\D esktop\Files\\"
Aug 4 '11 #49
Jeffrey Tan
86 New Member
@Rabbit: there is code above that creates the directory if it does not exist. sorry forgot to add that in post

Expand|Select|Wrap|Line Numbers
  1. If Not FileExists(strDestination) Then
  2.        MkDir (strDestination)
  3.     End If
originally, the strDestination was C:\Windows\Temp \.

I have a feeling it's got something to do with Adobe PDF on my machine.

during the day, i downloaded this template from microsoft called "call tracker" and there was this button that had email formats

I clicked on the button, but i do not see Adobe PDF on it.. so that's the thing I'm confused about.
Aug 4 '11 #50

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: 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...
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: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
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.