![]() |
|
Модераторы: Akina |
![]()
|
|
| nicka |
|
|||
|
Опытный ![]() ![]() Профиль Группа: Участник Сообщений: 378 Регистрация: 11.6.2003 Репутация: нет Всего: 1 |
Проблема заключаеться в следующем:
работаю в ACCESS, надо написать процедуру, которая бы открывала Microsoft OutLook, и при этом сажала на место содержимого письма данные из запроса, и на место адрессата тоже данное из запроса То есть необходима автоматизация процесса рассылки писем. Например если запустить в ACCESS-е готовый отчет, то в меню File есть пункт Отправить>>Сообщение(как вложенное), если это использовать, то откроеться Microsoft OutLook и на мемте содержимого письма посадиться содержимое отчета Нужна команда делающая аналогичные действия, я думаю такое наверняка существует, но не могу найти, например есть HyperLink, но он не позваляет заполнить содержимое письма заданным текстом. Вот так, жду ответа |
|||
|
||||
| Alexei |
|
|||
|
Опытный ![]() ![]() Профиль Группа: Участник Сообщений: 382 Регистрация: 20.8.2003 Репутация: нет Всего: 4 |
MAPI контрл
|
|||
|
||||
| nicka |
|
|||
|
Опытный ![]() ![]() Профиль Группа: Участник Сообщений: 378 Регистрация: 11.6.2003 Репутация: нет Всего: 1 |
С чем ето едят, please Поподробнее для невежд пожалуйста |
|||
|
||||
| Alexei |
|
|||
|
Опытный ![]() ![]() Профиль Группа: Участник Сообщений: 382 Регистрация: 20.8.2003 Репутация: нет Всего: 4 |
||||
|
||||
| nicka |
|
|||
|
Опытный ![]() ![]() Профиль Группа: Участник Сообщений: 378 Регистрация: 11.6.2003 Репутация: нет Всего: 1 |
Но у меня на машине нет Mdisp32.tlb, соответственно код не работает. Где его достать!!! |
|||
|
||||
| Alexei |
|
|||
|
Опытный ![]() ![]() Профиль Группа: Участник Сообщений: 382 Регистрация: 20.8.2003 Репутация: нет Всего: 4 |
Попробуй Аутлук:
http://msdn.microsoft.com/library/default....sdn_movs105.asp , а еще набери в поиске: MAPI |
|||
|
||||
| cardinal |
|
||||||||
![]() Инженер ![]() ![]() ![]() ![]() Профиль Группа: Экс. модератор Сообщений: 6003 Регистрация: 26.3.2002 Где: Германия Репутация: 19 Всего: 99 |
Читайте здесь. А вообще вот самое важное из всего этого. В принципе принцип ясен, попробуй может подойдет.
I want to write a program that my customers can click a button and send me a copy of their database (for backup or troubleshooting). Most of them use AOL, and all I can find is code for using Outlook. *********************************
************************************* What is the syntax (and/or other requirements) for sending email from Access through the AOL mail system? AOL's e-mail system is very much proprietary. And they seem to be tight-lipped as far as how one would write utilities to interface with it. Once upon a yester-year, they had something of a SDK for their system (not just e-mail). But because of a problem of abuse by some (who used it to knock people off-line, steal user's passwords and credit card info, etc), they seem to want to keep that knowledge private. The only option you'd have, to my knowledge, would be to write a module which would launch AOL (after you've located where the user installed it) and then take control of it by sending messages to the program to cause the mail window to show up, set the text in the mail window, etc. Essentially mimicking user activity as if the user was doing all of this manually. You'd then would likely need to account for the different versions of AOL your customers may have. You may have to vary your programatic interaction with the AOL program, depending on the AOL version you're working with. You'd have to use various Windows API functions in order to accomplish this. It would not be a simple task at all. this may help PSS ID Number: Q161833 Article last modified on 11-21-1997 WINDOWS:4.0 WINDOWS ====================================================================== ---------------------------------------------------------------------- The information in this article applies to: - Standard, Professional, and Enterprise Editions of Microsoft Visual Basic, 16-bit and 32-bit, for Windows, version 4.0 ---------------------------------------------------------------------- SUMMARY ======= This article outlines the steps necessary to programmatically send an e-mail message from Visual Basic using the OLE Messaging Library. This example assumes that the OLE Messaging Library was properly installed on your computer (typically, by installing Exchange). The sample code can also be used from VBA, allowing Access, Excel, or Project to send e-mail via the OLE Messaging Library. MORE INFORMATION ================ With the OLE Messaging Library, you can quickly and easily add e-mail capabilities (that is, sending and receiving e-mail messages, and interacting with folders and address books) to your Visual Basic application. You can create programmable messaging objects, and then use their properties and methods to meet the needs of your application. The objects and methods exposed by the OLE Messaging Library are much more robust than the MAPI controls that ship with Visual Basic, thus allowing access to many MAPI properties that the MSMAPI OCX controls simply do not address. "Microsoft OLE Messaging Library Programmers Reference" is available in the Microsoft Developer Network (MSDN), or the Olemsg.hlp file that installs with Exchange Forms Designer 4.0. NOTE: If this object library is not available in the References list, click the Browse button and search your Windows\System folder for the file Mdisp32.tlb. Sample Code ----------- To build a Visual Basic project that sends a simple message, follow these steps: 1. Open a new project in Visual Basic. 2. On the Tools menu, click References. Select "OLE/Messaging 1.0 Object Library." 3. Add a CommandButton to the default form. Accept the default name, Command1. 4. Copy the following code into the General Declarations section of the default form:
5. Run the project. Click Command1. You have sent e-mail from Visual Basic. REFERENCES ========== Microsoft OLE Messaging Library Programmers Reference For additional information about Collaboration Data Objects versus Active Messaging, please see the following article in the Microsoft Knowledge Base: ARTICLE-ID: Q176916 TITLE : INFO: Active Messaging and Collaboration Data Objects (CDO) ====================================================================== Keywords : kbprg ActMsg OLEMSG vbwin Technology : kbole kbvba Version : WINDOWS:4.0 Platform : WINDOWS Issue type : kbhowto ====================================================================== Copyright Microsoft Corporation 1997. >What is the syntax (and/or other requirements) >for sending email from Access through the AOL >mail system? AOL's e-mail system is very much proprietary. And they seem to be tight-lipped as far as how one would write utilities to interface with it. Once upon a yester-year, they had something of a SDK for their system (not just e-mail). But because of a problem of abuse by some (who used it to knock people off-line, steal user's passwords and credit card info, etc), they seem to want to keep that knowledge private. The only option you'd have, to my knowledge, would be to write a module which would launch AOL (after you've located where the user installed it) and then take control of it by sending messages to the program to cause the mail window to show up, set the text in the mail window, etc. Essentially mimicking user activity as if the user was doing all of this manually. You'd then would likely need to account for the different versions of AOL your customers may have. You may have to vary your programatic interaction with the AOL program, depending on the AOL version you're working with. You'd have to use various Windows API functions in order to accomplish this. It would not be a simple task at all. ********************************** this may help PSS ID Number: Q161833 Article last modified on 11-21-1997 WINDOWS:4.0 WINDOWS ====================================================================== ---------------------------------------------------------------------- The information in this article applies to: - Standard, Professional, and Enterprise Editions of Microsoft Visual Basic, 16-bit and 32-bit, for Windows, version 4.0 ---------------------------------------------------------------------- SUMMARY ======= This article outlines the steps necessary to programmatically send an e-mail message from Visual Basic using the OLE Messaging Library. This example assumes that the OLE Messaging Library was properly installed on your computer (typically, by installing Exchange). The sample code can also be used from VBA, allowing Access, Excel, or Project to send e-mail via the OLE Messaging Library. MORE INFORMATION ================ With the OLE Messaging Library, you can quickly and easily add e-mail capabilities (that is, sending and receiving e-mail messages, and interacting with folders and address books) to your Visual Basic application. You can create programmable messaging objects, and then use their properties and methods to meet the needs of your application. The objects and methods exposed by the OLE Messaging Library are much more robust than the MAPI controls that ship with Visual Basic, thus allowing access to many MAPI properties that the MSMAPI OCX controls simply do not address. "Microsoft OLE Messaging Library Programmers Reference" is available in the Microsoft Developer Network (MSDN), or the Olemsg.hlp file that installs with Exchange Forms Designer 4.0. NOTE: If this object library is not available in the References list, click the Browse button and search your Windows\System folder for the file Mdisp32.tlb. Sample Code ----------- To build a Visual Basic project that sends a simple message, follow these steps: 1. Open a new project in Visual Basic. 2. On the Tools menu, click References. Select "OLE/Messaging 1.0 Object Library." 3. Add a CommandButton to the default form. Accept the default name, Command1. 4. Copy the following code into the General Declarations section of the default form:
5. Run the project. Click Command1. You have sent e-mail from Visual Basic. REFERENCES ========== Microsoft OLE Messaging Library Programmers Reference For additional information about Collaboration Data Objects versus Active Messaging, please see the following article in the Microsoft Knowledge Base: ARTICLE-ID: Q176916 TITLE : INFO: Active Messaging and Collaboration Data Objects (CDO) ====================================================================== Keywords : kbprg ActMsg OLEMSG vbwin Technology : kbole kbvba Version : WINDOWS:4.0 Platform : WINDOWS Issue type : kbhowto ====================================================================== Copyright Microsoft Corporation 1997. ****************************** also here's something for Access 2, but you should be able to modify it to work with 97 it demonstrates the api MAPISendMail (however you may need to verify that it is the 32 bit syntax) PSS ID Number: Q99403 Article last modified on 04-29-1998 1.0 1.1 2.0 WINDOWS ====================================================================== --------------------------------------------------------------------- The information in this article applies to: - Microsoft Access versions 1.0, 1.1, 2.0 --------------------------------------------------------------------- SUMMARY ======= Advanced: Requires expert coding, interoperability, and multiuser skills. This article demonstrates how to use the Mail Application Programming Interface (MAPI) in Access Basic to send a mail message from a form. You can send mail to one or more persons using the To and CC (carbon copy) fields in the example below. MORE INFORMATION ================ This article assumes that you are familiar with Access Basic and with creating Microsoft Access applications using the programming tools provided with Microsoft Access. For more information about Access Basic, please refer to the "Building Applications" manual. The following procedure explains how to use this sample module: 1. Create new, unbound form with multiple controls for entering recipient addresses and message text, for example: Form: Test ----------- Caption: TestForm Text box: Subject ControlName: Subject Text box: To ControlName: To Text box: CC ControlName: CC Text box: Attach ControlName: Attach Text box: Message ControlName: Message Command button: Button0 Caption: Send Message OnPush: =Mail() NOTE: In version 2.0, the OnPush property is called the OnClick property. 2. Create a new module and enter the following code: NOTE: In the following sample code, an underscore (_) is used as a line continuation character for easier reading. Remove the underscore from the end of the line when re-creating this code in Access Basic.
REFERENCES ========== Microsoft Mail "Technical Reference," Chapter 4 Additional query words: mail application programming api ====================================================================== Keywords : kbinterop kbprg Version : 1.0 1.1 2.0 Platform : WINDOWS Hardware : x86 Issue type : kbinfo ====================================================================== Copyright Microsoft Corporation 1998. ******************************** AOL's e-mail system is not MAPI compliant. It is their own proprietary system. That is some good reference material, though. Thanks. -------------------- Немецкая оппозиция потребовала упростить натурализацию иммигрантов В моем блоге: Разные истории из жизни в Германии "Познание бесконечности требует бесконечного времени, а потому работай не работай - все едино". А. и Б. Стругацкие |
||||||||
|
|||||||||
| Unregistered |
|
|||
|
Unregistered |
Это вроде работает, только к сожалению сколько раз посылаю письмо, столько раз открываеться OUTLOOK.exe, так что при например выключении компъютера начинаються процессы их аварийного закрытия в итоге машина не хочет выключаться, Вроде Set maiMail = Nothing должно закрывать объект? Из-за чего это и Что можно сделать? |
|||
|
||||
| cardinal |
|
|||
![]() Инженер ![]() ![]() ![]() ![]() Профиль Группа: Экс. модератор Сообщений: 6003 Регистрация: 26.3.2002 Где: Германия Репутация: 19 Всего: 99 |
А у меня этого не наблюдается. OUTLOOK.exe вообще не запускается, а письма просто попадают в папку "исходящие" в Microsoft Outlook. -------------------- Немецкая оппозиция потребовала упростить натурализацию иммигрантов В моем блоге: Разные истории из жизни в Германии "Познание бесконечности требует бесконечного времени, а потому работай не работай - все едино". А. и Б. Стругацкие |
|||
|
||||
![]()
|
| Правила форума "VB6" | |
|
|
Запрещается! 1. Публиковать ссылки на вскрытые компоненты 2. Обсуждать взлом компонентов и делиться вскрытыми компонентами
Если Вам понравилась атмосфера форума, заходите к нам чаще! С уважением, Akina. |
| 0 Пользователей читают эту тему (0 Гостей и 0 Скрытых Пользователей) | |
| 0 Пользователей: | |
| « Предыдущая тема | VB6 | Следующая тема » |
|
|
По вопросам размещения рекламы пишите на vladimir(sobaka)vingrad.ru
Отказ от ответственности Powered by Invision Power Board(R) 1.3 © 2003 IPS, Inc. |