473,839 Members | 1,631 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

auto email pdf

Des
I was wondering if anyone could help me out with this. I use Access
2003 to generate certain files and then I convert them to pdf, I was
wondering if anyone would know the code I could use where I would have
the ability to have them automatically emailed after they're converted
to different sources?

I can be emailed via de***********@a ol.com

Thanks..

Apr 24 '07 #1
10 7937
Look in Access Help for the "SendObject " command.
"Des" <de***********@ aol.comwrote in message
news:11******** *************@o 40g2000prh.goog legroups.com...
>I was wondering if anyone could help me out with this. I use Access
2003 to generate certain files and then I convert them to pdf, I was
wondering if anyone would know the code I could use where I would have
the ability to have them automatically emailed after they're converted
to different sources?

I can be emailed via de***********@a ol.com

Thanks..

Apr 24 '07 #2
Ed Robichaud wrote:
Look in Access Help for the "SendObject " command.
SendObject allows you to send non-Access documents as attachments?

To the OP, you might want to start here.
http://www.granite.ab.ca/access/email.htm

>

"Des" <de***********@ aol.comwrote in message
news:11******** *************@o 40g2000prh.goog legroups.com...
>>I was wondering if anyone could help me out with this. I use Access
2003 to generate certain files and then I convert them to pdf, I was
wondering if anyone would know the code I could use where I would have
the ability to have them automatically emailed after they're converted
to different sources?

I can be emailed via de***********@a ol.com

Thanks..


Apr 24 '07 #3
On Apr 24, 5:46 am, "Ed Robichaud" <edrobich...@wd n.comwrote:
Look in Access Help for the "SendObject " command.

"Des" <despairing...@ aol.comwrote in message

news:11******** *************@o 40g2000prh.goog legroups.com...
I was wondering if anyone could help me out with this. I use Access
2003 to generate certain files and then I convert them to pdf, I was
wondering if anyone would know the code I could use where I would have
the ability to have them automatically emailed after they're converted
to different sources?
I can be emailed via despairing...@a ol.com
Thanks..- Hide quoted text -

- Show quoted text -
this might help you
http://office.microsoft.com/en-gb/te...033.aspx?Categ...

Apr 24 '07 #4
SendObject will not allow you to send a file. You will need a function
opening an Outlook object. Following is a function I have adapted to send a
list of files.

'---------------------
' Create a email with attachments
' stSendTo Email address
' stBody Body of the message
' stSubject Subject of the message
' astAttach Array of strings listing the path to the attachments
' intAcount Number of attachments
' intSend True if the message should be sent without preview

Public Function EmailAttach(ByR ef stSendTo As String, ByRef stBody As
String, ByRef stSubject As String, _
astAttach() As String, intAcount As
Integer, intSend As Integer) As Integer

On Error GoTo EmailAttach

Dim oLook As Object
Dim oMail As Object
Dim i As Integer

Set oLook = CreateObject("O utlook.Applicat ion")
Set oMail = oLook.CreateIte m(0)
With oMail
.To = stSendTo
.Body = stBody
.Subject = stSubject
.ReadReceiptReq uested = True

If intAcount <0 Then
For i = 1 To intAcount
.Attachments.Ad d (astAttach(i - 1))
Next
End If

If intSend = True Then
.Send ' Windows may complain about
security
Else
.Display
End If

End With

Set oMail = Nothing
Set oLook = Nothing
EmailAttach = True
Exit Function

EmailAttach:

MsgBox "The following error was noted : " & Err.Description & Chr$(10) &
Chr$(13) & _
"Your email may not have been sent.", vbCritical, "Error"

On Error Resume Next
Set oMail = Nothing
Set oLook = Nothing
EmailAttach = False

End Function

"Ed Robichaud" <ed*********@wd n.comwrote in message
news:46******** **************@ news.wdn.com...
Look in Access Help for the "SendObject " command.
"Des" <de***********@ aol.comwrote in message
news:11******** *************@o 40g2000prh.goog legroups.com...
I was wondering if anyone could help me out with this. I use Access
2003 to generate certain files and then I convert them to pdf, I was
wondering if anyone would know the code I could use where I would have
the ability to have them automatically emailed after they're converted
to different sources?

I can be emailed via de***********@a ol.com

Thanks..


Apr 24 '07 #5
Des
On Apr 24, 7:46 am, "Ed Robichaud" <edrobich...@wd n.comwrote:
Look in Access Help for the "SendObject " command.

"Des" <despairing...@ aol.comwrote in message

news:11******** *************@o 40g2000prh.goog legroups.com...
I was wondering if anyone could help me out with this. I use Access
2003 to generate certain files and then I convert them to pdf, I was
wondering if anyone would know the code I could use where I would have
the ability to have them automatically emailed after they're converted
to different sources?
I can be emailed via despairing...@a ol.com
Thanks..
That doesn't really help me. I use access to bring data in and then I
convert it to pdf and from there is where I would like to set up the
auto email function. I'm assuming it's just a simple batch function
and possibly a script. If anyone has done something like this before,
please let me know. Thanks again for the help.

Apr 25 '07 #6
There is a great addon from ACG Soft that allows both PDF and
emailing.

It works with all different types of PDF drivers, email clients,
etc.

I highly recommend them.

http://www.groupacg.com/

On Apr 24, 8:46 am, "Ed Robichaud" <edrobich...@wd n.comwrote:
Look in Access Help for the "SendObject " command.

"Des" <despairing...@ aol.comwrote in message

news:11******** *************@o 40g2000prh.goog legroups.com...
I was wondering if anyone could help me out with this. I use Access
2003 to generate certain files and then I convert them to pdf, I was
wondering if anyone would know the code I could use where I would have
the ability to have them automatically emailed after they're converted
to different sources?
I can be emailed via despairing...@a ol.com
Thanks..- Hide quoted text -

- Show quoted text -

Apr 25 '07 #7
Des wrote:
On Apr 24, 7:46 am, "Ed Robichaud" <edrobich...@wd n.comwrote:
>>Look in Access Help for the "SendObject " command.

"Des" <despairing...@ aol.comwrote in message

news:11****** *************** @o40g2000prh.go oglegroups.com. ..

>>>I was wondering if anyone could help me out with this. I use Access
2003 to generate certain files and then I convert them to pdf, I was
wondering if anyone would know the code I could use where I would have
the ability to have them automatically emailed after they're converted
to different sources?
>>>I can be emailed via despairing...@a ol.com
>>>Thanks..


That doesn't really help me. I use access to bring data in and then I
convert it to pdf and from there is where I would like to set up the
auto email function. I'm assuming it's just a simple batch function
and possibly a script. If anyone has done something like this before,
please let me know. Thanks again for the help.
There are many options. One I prefer is to use the CDO library which can easily be used in
Access VBA or vbScript.

Here is sample code (in vbScript):

Const cdoSendUsingPic kup = 1 'Send message using the local SMTP service pickup directory.
Const cdoSendUsingPor t = 2 'Send the message using the network (SMTP over the network).

Const cdoAnonymous = 0 'Do not authenticate
Const cdoBasic = 1 'basic (clear-text) authentication
Const cdoNTLM = 2 'NTLM

Set objMessage = CreateObject("C DO.Message")
objMessage.Subj ect = "Sample CDO Message"
objMessage.From = """Me"" <me@my.com>"
objMessage.To = "so******@yahoo .com"
objMessage.Text Body = "This is some sample message text.." & vbCRLF & _
"It was sent using the CDO Library."

' ==This section provides the configuration information for the remote SMTP server.

objMessage.Conf iguration.Field s.Item _
("http://schemas.microso ft.com/cdo/configuration/sendusing") = 2

' Name or IP of Remote SMTP Server
objMessage.Conf iguration.Field s.Item _
("http://schemas.microso ft.com/cdo/configuration/smtpserver") = "mail.your. com"

' Type of authentication, NONE, Basic (Base64 encoded), NTLM
objMessage.Conf iguration.Field s.Item _
("http://schemas.microso ft.com/cdo/configuration/smtpauthenticat e") = cdoNTLM

' Your UserID on the SMTP server
objMessage.Conf iguration.Field s.Item _
("http://schemas.microso ft.com/cdo/configuration/sendusername") = "youruserid "

' Your password on the SMTP server
objMessage.Conf iguration.Field s.Item _
("http://schemas.microso ft.com/cdo/configuration/sendpassword") = "yourpasswo rd"

' Server port (typically 25)
objMessage.Conf iguration.Field s.Item _
("http://schemas.microso ft.com/cdo/configuration/smtpserverport" ) = 25

' Use SSL for the connection (False or True)
objMessage.Conf iguration.Field s.Item _
("http://schemas.microso ft.com/cdo/configuration/smtpusessl") = False

' Connection Timeout in seconds (the maximum time CDO will try to
' establish a connection to the SMTP server)
objMessage.Conf iguration.Field s.Item _
("http://schemas.microso ft.com/cdo/configuration/smtpconnectiont imeout") = 60

objMessage.Conf iguration.Field s.Update

' ==End remote SMTP server configuration section==

objMessage.Send

Set objMessage = Nothing

--
---------------
John Mishefske, Microsoft Access MVP
Apr 26 '07 #8

"John Mishefske" <jm**********@S PAMyahoo.comwro te in message
news:46******** *************** @roadrunner.com ...
Des wrote:
On Apr 24, 7:46 am, "Ed Robichaud" <edrobich...@wd n.comwrote:
>Look in Access Help for the "SendObject " command.

"Des" <despairing...@ aol.comwrote in message

news:11******* **************@ o40g2000prh.goo glegroups.com.. .
I was wondering if anyone could help me out with this. I use Access
2003 to generate certain files and then I convert them to pdf, I was
wondering if anyone would know the code I could use where I would have
the ability to have them automatically emailed after they're converted
to different sources?

I can be emailed via despairing...@a ol.com

Thanks..

That doesn't really help me. I use access to bring data in and then I
convert it to pdf and from there is where I would like to set up the
auto email function. I'm assuming it's just a simple batch function
and possibly a script. If anyone has done something like this before,
please let me know. Thanks again for the help.

There are many options. One I prefer is to use the CDO library which can
easily be used in
Access VBA or vbScript.

Here is sample code (in vbScript):

Const cdoSendUsingPic kup = 1 'Send message using the local SMTP service
pickup directory.
Const cdoSendUsingPor t = 2 'Send the message using the network (SMTP over
the network).
>
Const cdoAnonymous = 0 'Do not authenticate
Const cdoBasic = 1 'basic (clear-text) authentication
Const cdoNTLM = 2 'NTLM

Set objMessage = CreateObject("C DO.Message")
objMessage.Subj ect = "Sample CDO Message"
objMessage.From = """Me"" <me@my.com>"
objMessage.To = "so******@yahoo .com"
objMessage.Text Body = "This is some sample message text.." & vbCRLF & _
"It was sent using the CDO Library."

' ==This section provides the configuration information for the remote
SMTP server.
>
objMessage.Conf iguration.Field s.Item _
("http://schemas.microso ft.com/cdo/configuration/sendusing") = 2

' Name or IP of Remote SMTP Server
objMessage.Conf iguration.Field s.Item _
("http://schemas.microso ft.com/cdo/configuration/smtpserver") =
"mail.your. com"
>
' Type of authentication, NONE, Basic (Base64 encoded), NTLM
objMessage.Conf iguration.Field s.Item _
("http://schemas.microso ft.com/cdo/configuration/smtpauthenticat e") =
cdoNTLM
>
' Your UserID on the SMTP server
objMessage.Conf iguration.Field s.Item _
("http://schemas.microso ft.com/cdo/configuration/sendusername") =
"youruserid "
>
' Your password on the SMTP server
objMessage.Conf iguration.Field s.Item _
("http://schemas.microso ft.com/cdo/configuration/sendpassword") =
"yourpasswo rd"
>
' Server port (typically 25)
objMessage.Conf iguration.Field s.Item _
("http://schemas.microso ft.com/cdo/configuration/smtpserverport" ) = 25

' Use SSL for the connection (False or True)
objMessage.Conf iguration.Field s.Item _
("http://schemas.microso ft.com/cdo/configuration/smtpusessl") = False

' Connection Timeout in seconds (the maximum time CDO will try to
' establish a connection to the SMTP server)
objMessage.Conf iguration.Field s.Item _
("http://schemas.microso ft.com/cdo/configuration/smtpconnectiont imeout")
= 60
>
objMessage.Conf iguration.Field s.Update

' ==End remote SMTP server configuration section==

objMessage.Send

Set objMessage = Nothing

--
---------------
John Mishefske, Microsoft Access MVP
I was playing with your code, which worked perfect.

How do you attach a file or files to the message?
Apr 26 '07 #9
paii, Ron wrote:
"John Mishefske" <jm**********@S PAMyahoo.comwro te in message news:46******** *************** @roadrunner.com ...
>There are many options. One I prefer is to use the CDO library which can easily be used in
Access VBA or vbScript.
--
---------------
John Mishefske, Microsoft Access MVP

I was playing with your code, which worked perfect.

How do you attach a file or files to the message?
The .AddAttachment method which takes a String file location:

objMessage.AddA ttachment "c:\temp\test.d oc"

You could put it a line above the objMessage.Send in my copied example.

Here are some resources to see sample coding:

http://www.paulsadowski.com/WSH/cdo.htm

http://www.pa-software.com/scripts/?tp=vbs&sc=cdoemail

http://msdn2.microsoft.com/en-us/library/ms526983.aspx
--
---------------
John Mishefske, Microsoft Access MVP
Apr 27 '07 #10

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
12722
by: Tom | last post by:
I am trying to store information into a table that has an auto increment field. There is currently no data in the table. Using the code below I cannot insert data into the table. I get an error telling me that "Number of query values and destination fields are not the same." If I add a value for the auto increment field to the SQL String the data is entered into the table with no problems but obviously the auto increment field now...
6
10246
by: Corepaul | last post by:
I am new to Access 2000. My operating system is Windows 2000. In the early stage of development I noticed something weird. On my form, I have a Command Button named "btnAlbumUp". The first time that I reference this button in VBA code, the Visual Basic Editor capitalizes the P changing btnAlbumUp.SetFocus to
9
2523
by: Alan Mackenzie | last post by:
To all those who use (X)Emacs's CC Mode to edit C, C++, Java, Objective-C, Pike, AWK or IDL: To help direct the development of CC Mode, it would be useful to find out how people use the auto-newline "minor mode" facility. If you could spare a little time, would you answer these questions, please: o Do you program with auto-newline switched on (e.g. do you get NLs inserted automatically after typing a `;' or `{')? o Did you configure...
20
2886
by: Vijay Kumar R. Zanvar | last post by:
Hello, Unlike register, auto keyword can not be used to declare formal parameter(s). Is there any specific reason for this? Kind regards, Vijay Kumar R. Zanvar
5
5161
by: Pauloviè Michal | last post by:
hi all, I have problem with SERIAL field type (or sequence functionality). I have table with three columns - ID, IDS, NAME. I want auto-increment IDS grouped by ID. Example: 1, 1, Ferdo 1, 2, John 2, 1, Martin 1, 3, Elvira
13
4728
by: S.Dickson | last post by:
I had an access database that i use as an ordering system. I have a form for entering customer details. When i add a new customer on the form the customer number is an auto number that appears when i type in the details. I have just moved over to mysql server with access as the front end. I have setup the sql tables with the customer number as autonumber. When i go into the form and add a new customer it does not generate the
11
10759
by: mp- | last post by:
I want to be able to allow people to check their email from my PHP online application. Given only the users 1) email address, 2) username (if applicable) and 3) password - how can I auto detect a remote IMAP/POP3 server so that I can connect and fetch mail for the user. (Ultimately, I don't want users to have to know what the IMAP/POP3 server name / port is .... I would like to auto-detect all of that). At first I thought I could use...
10
2184
by: laredotornado | last post by:
Hi, I'm using php 5. Does anyone have any code or a function that auto submits a form that contains a single INPUT, of type = file? Thanks, - Dave
3
4027
by: TS | last post by:
I am using IE 7. I have a website running on my local machine (localhost) and auto complete doesnt work for any of the textboxes, but going to web sites on the internet does support this so i know the browser has this config turned on. any ideas why it doesnt work on my local web application (.net 2)? thanks
21
6370
by: JOYCE | last post by:
Look the subject,that's my problem! I hope someone can help me, thanks
0
9856
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
9698
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
10589
jinu1996
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...
0
9426
agi2029
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...
1
7833
isladogs
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...
0
7021
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
5867
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4493
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
3136
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.