Carolyn Johnson
cjlabs at worldnet.att.net
Wed Oct 21 19:11:26 CDT 2009
Thanks. I had tried that, but screwed it up in the Alias by renaming the function by mistake -- mapisendEmail instead of mapisendmail Your post got me straightened out, and I understand the syntax better. The joy of Vista. Thanks again, Carolyn Johnson ----- Original Message ----- From: Drew Wutka To: Access Developers discussion and problem solving Sent: Wednesday, October 21, 2009 3:33 PM Subject: Re: [AccessD] Declare function question -- correction The problem is that Alias is what is in the .dll, not what you call it. So it should be Declare Function MAPISendMailOE lib... ALIAS MAPISendMail .... Drew -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Carolyn Johnson Sent: Wednesday, October 21, 2009 11:34 AM To: Access Developers discussion and problem solving Subject: Re: [AccessD] Declare function question -- correction Sorry -- the original MAPISendEmail does not have the Alias included. I was playing around with getting it to work and added that. Carolyn Johnson ----- Original Message ----- From: Carolyn Johnson To: Access Developers Sent: Wednesday, October 21, 2009 11:28 AM Subject: [AccessD] Declare function question I have code to send an email via Outlook Express. It uses the following function. Declare Function MAPISendMail _ Lib "c:\program files\outlook express\msoe.dll" Alias _ "MAPISendEmailOE" ( _ ByVal Session As Long, _ ByVal UIParam As Long, _ message As MAPIMessage, _ ByVal Flags As Long, _ ByVal Reserved As Long) As Long Since Outlook Express is not part of Vista, I need to also have a similar function for Windows Mail with the corresponding dll: Declare Function MAPISendMail _ Lib "c:\Windows\System\mapi32.dll" ( _ ByVal Session As Long, _ ByVal UIParam As Long, _ message As MAPIMessage, _ ByVal Flags As Long, _ ByVal Reserved As Long) As Long I tried to rename the first one to MAPISendMailOE and then choose the function to call based on the operating system (determined when the database is first opened). When I rename the function, I get the error "Can't find DLL entry point MAPISendEmailOE in c:\program files\outlook express\msoe.dll" on the WinXP computer. Same type of problem if I rename the Vista version. How do I have both functions available and call the appropriate one for the specific computer? Thanks Carolyn Johnson St Louis, MO -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com The information contained in this transmission is intended only for the person or entity to which it is addressed and may contain II-VI Proprietary and/or II-VI Business Sensitive material. If you are not the intended recipient, please contact the sender immediately and destroy the material in its entirety, whether electronic or hard copy. You are notified that any review, retransmission, copying, disclosure, dissemination, or other use of, or taking of any action in reliance upon this information by persons or entities other than the intended recipient is prohibited. -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com