By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
446,398 Members | 933 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 446,398 IT Pros & Developers. It's quick & easy.

Sending email from Outlook group box with Access VBA

P: n/a
I have code that current sends spreadsheets by email from a user's
Outlook. I need to modify the code to send the email from their group
email box, so the recipient can respond to the group email. Any ideas
how I could do that? Here is part of my code:

If qda.EOF = False And qda.BOF = False Then

qda.MoveFirst

Do While qda.EOF = False

autoFCinput = qda.Fields("Pull FCs").Value

qda.MoveNext

FCFileName = "c:\FC_Perf_" & autoFCinput & ".xls"

FCInput = "'" & autoFCinput & "'"

Set qds = dbs.OpenRecordset("SELECT emailAddress FROM FCAddressBook
where FCCodeEmail = " & FCInput & ";")

FCAddress = qds.Fields("emailAddress").Value

strSQL = "SELECT * FROM otherAccounts WHERE InputSource = 'FC
Input' AND FCCode = " & FCInput & "AND format(ImportDate,'m/dd/yyyy')
=" & "'" & importDate & "'" & ";"

Set qdf = dbs.CreateQueryDef("FC OUTPUT QUERY", strSQL)

strMsg = "XXX"

DoCmd.SendObject acSendQuery, "FC OUTPUT QUERY", "*.xls",
FCAddress, , , "Urgent: Consolidated Statement Info.", strMsg, False

DoCmd.DeleteObject acQuery, "FC OUTPUT QUERY"

Loop

End If

Thanks!
Dec 19 '07 #1
Share this Question
Share on Google+
1 Reply


P: n/a
se***********@yahoo.com wrote:
>I have code that current sends spreadsheets by email from a user's
Outlook. I need to modify the code to send the email from their group
email box, so the recipient can respond to the group email. Any ideas
how I could do that? Here is part of my code:
I vaguelly recall something about Outlook Profiles that might solve your problem.
Here's some info at a web page: http://www.slipstick.com/outlook/profile.htm. I
suspect the user will be required to exit Outlook and start it with the proper
priofile.

You may be best going to a SMTP solution and bypassing Outlook completely. I'm
assuming that your corporations IT department will allow port 25 access to your
Exchange server. However this can involve importing lots of rather ugly code
although you may not have to deal with the guts of it much.

http://www.granite.ab.ca/access/email/winsock.htm

Tony
--
Tony Toews, Microsoft Access MVP
Please respond only in the newsgroups so that others can
read the entire thread of messages.
Microsoft Access Links, Hints, Tips & Accounting Systems at
http://www.granite.ab.ca/accsmstr.htm
Tony's Microsoft Access Blog - http://msmvps.com/blogs/access/
Dec 21 '07 #2

This discussion thread is closed

Replies have been disabled for this discussion.