本文介绍了如何通过Microsoft Access与Visual Basic建立网络连接?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们在Microsoft Access中有一个Visual Basic应用程序,我们需要建立网络连接.使用VB6,有一个方便的小控件WinSock使之成为可能,但是对于Microsoft Access中存在的精简VB版本,我找不到任何类似的东西.有什么想法吗?

We have a Visual Basic application inside of Microsoft Access and we need to make a network connection. With VB6, there was a handy little control called WinSock that made this possible, but I can't find anything similar for the stripped down VB version that exists inside of Microsoft Access. Any ideas?

由于我没有得到任何答案,因此我将尽力澄清我需要什么.

Since I'm not getting any answers, I'll try to clarify what I need this for.

我的应用程序发送了一封电子邮件,我们目前正在使用内置的Outlook对象来创建消息并在后台发送.缺点是它会提示用户批准外部程序"发送电子邮件,这使我们的用户感到沮丧,并且似乎没有必要.我能够在网上找到的所有其他电子邮件选项都要求我们下载或购买控件,这对于我们来说很难部署到所有用户的工作上.

My application sends out an email, and we're currently using a built-in Outlook object to create a message and send it in the background. The drawback is that it prompts the user to approve an "outside program" to send an email, which is frustrating our users and seems unnecessary. All of the other emailing options I've been able to find online require us to either download or purchase a control, which would be too labor intensive for us to deploy to all of our users.

我希望使用套接字控件手动连接到SMTP服务器并发送消息(因为在其他语言中这很简单),但是我找不到在VBA中建立TCP连接的任何方法.

I was hoping to use a socket control to manually connect to the SMTP server and send a message (since this is trivial in other languages) but I can't find any way to make a TCP connection in VBA.

推荐答案

上个月我刚刚处理了这个问题.由于各种原因,CDO不够用,直接使用MAPI的方式过于复杂,Outlook提示您抱怨完全不可接受.

I just dealt with this very issue in the last month. For various reasons, CDO was not adequate, direct use of MAPI way too complex, and the Outlook prompt you complain about completely unacceptable.

我最终使用了 Outlook Redemption .它被Access开发人员广泛使用,尽管我发现它相当复杂,并且没有很好的文档记录.但这做得很好.

I ended up using Outlook Redemption. It's widely used by Access developers, though I found it to be rather convoluted and not terribly well-documented. But it is doing the job quite well.

这篇关于如何通过Microsoft Access与Visual Basic建立网络连接?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-07 01:43