Snitz Forums 2000
Snitz Forums 2000
Home | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 Community Forums
 Community Discussions (All other subjects)
 Database Driven Mailing List Software
 New Topic  Topic Locked
 Printer Friendly
Previous Page | Next Page
Author Previous Topic Topic Next Topic
Page: of 3

ruirib
Snitz Forums Admin

Portugal
26364 Posts

Posted - 01 June 2005 :  08:00:59  Show Profile  Send ruirib a Yahoo! Message
I prefer to Insert a Module, into the Microsoft Outlook Object and paste the code into the module. The code is currently a function. You can change the function into a Sub and execute directly from the Macros window, or insert a new Sub to call the function.

P.S.: I usually don't do this from Outlook. I use the same code from Access, directly, so it may be possible to do it differently.


Snitz 3.4 Readme | Like the support? Support Snitz too

Edited by - ruirib on 01 June 2005 08:04:46
Go to Top of Page

Shaggy
Support Moderator

Ireland
6780 Posts

Posted - 01 June 2005 :  08:06:24  Show Profile
Thanks, Rui, I'll let you know how I get on.


Search is your friend
“I was having a mildly paranoid day, mostly due to the
fact that the mad priest lady from over the river had
taken to nailing weasels to my front door again.”
Go to Top of Page

ruirib
Snitz Forums Admin

Portugal
26364 Posts

Posted - 01 June 2005 :  08:34:25  Show Profile  Send ruirib a Yahoo! Message
Okie dokie :).


Snitz 3.4 Readme | Like the support? Support Snitz too
Go to Top of Page

Shaggy
Support Moderator

Ireland
6780 Posts

Posted - 01 June 2005 :  10:10:22  Show Profile
Stuck already! When I hit the play icon in the toolbar to run the script I get a prompt to enter a name for my script with the "Run" button grayed out but no matter what name I try to give it, I cannot use the "Run" button, the only button not grayed out is "Cancel".


Search is your friend
“I was having a mildly paranoid day, mostly due to the
fact that the mad priest lady from over the river had
taken to nailing weasels to my front door again.”
Go to Top of Page

ruirib
Snitz Forums Admin

Portugal
26364 Posts

Posted - 01 June 2005 :  10:22:35  Show Profile  Send ruirib a Yahoo! Message
Did you create the code as a Sub or a Function? You should have a sub, so that you can execute from the Macros dialog box...


Snitz 3.4 Readme | Like the support? Support Snitz too
Go to Top of Page

Shaggy
Support Moderator

Ireland
6780 Posts

Posted - 01 June 2005 :  10:31:24  Show Profile
Ay, it's a sub.

edit: Wait, think I get you, now, hang on a tick ...


Search is your friend
“I was having a mildly paranoid day, mostly due to the
fact that the mad priest lady from over the river had
taken to nailing weasels to my front door again.”

Edited by - Shaggy on 01 June 2005 10:32:33
Go to Top of Page

ruirib
Snitz Forums Admin

Portugal
26364 Posts

Posted - 01 June 2005 :  10:32:03  Show Profile  Send ruirib a Yahoo! Message
So, go to the Macros dialog and execute from there.


Snitz 3.4 Readme | Like the support? Support Snitz too
Go to Top of Page

Shaggy
Support Moderator

Ireland
6780 Posts

Posted - 01 June 2005 :  10:40:17  Show Profile
Now I see I can't run the sub from within the VB editor itself I have to go Macros under tools in Outlook.

OK, now I've firgured that out, I've hit an error on line 5: "User-defined type not defined" with the highlighted code being: cnn As ADODB.Connection.

Sub is here.

Oh, and while I'm at it, I don't see anywhere in the sub for me to assign my mail server and address to send from, does this mean I'll have to set up an address in Outlook?


Search is your friend
“I was having a mildly paranoid day, mostly due to the
fact that the mad priest lady from over the river had
taken to nailing weasels to my front door again.”

Edited by - Shaggy on 01 June 2005 10:42:22
Go to Top of Page

ruirib
Snitz Forums Admin

Portugal
26364 Posts

Posted - 01 June 2005 :  12:44:01  Show Profile  Send ruirib a Yahoo! Message
Shaggy,

In the Visual Basic window, select Tools->References and then add a reference to one of the Microsoft ActiveX Data Objects library. That will fix the error.
The code will send the emails through your default Outlook account. I don't know how to change that, sorry.


Snitz 3.4 Readme | Like the support? Support Snitz too
Go to Top of Page

seahorse
Senior Member

USA
1075 Posts

Posted - 01 June 2005 :  22:54:26  Show Profile  Visit seahorse's Homepage
Don't know if this is too late or a bit out of your budget, but we use Bigfoot

http://www.bigfootinteractive.com/site/technology/web_based_asp.htm

Ken
===============
Worldwide Partner Group
Microsoft
Go to Top of Page

Shaggy
Support Moderator

Ireland
6780 Posts

Posted - 02 June 2005 :  05:37:31  Show Profile
Thanks, Ken, will add that to me list.

Finally got everything debugged but now Outlook is telling me:

"The macros in this project are disabled. Please refer to the online help or documentation of the host application to determine how to enable macros."

I don't have the Outlook's help files installed so can't look it up but I tried lowering the security level for Macros but it didn't help any.


Search is your friend
“I was having a mildly paranoid day, mostly due to the
fact that the mad priest lady from over the river had
taken to nailing weasels to my front door again.”

Edited by - Shaggy on 02 June 2005 05:38:15
Go to Top of Page

ruirib
Snitz Forums Admin

Portugal
26364 Posts

Posted - 02 June 2005 :  08:00:32  Show Profile  Send ruirib a Yahoo! Message
Shaggy,

Visit this page. Follow the instructions from step 6. That will enable you to overcome that.


Snitz 3.4 Readme | Like the support? Support Snitz too
Go to Top of Page

gelliott
Junior Member

USA
268 Posts

Posted - 09 June 2005 :  12:30:20  Show Profile
ruirib,

Perhaps you can help me with a similar issue. I am trying to write some VB code in MS Access 2000 to send emails with attachments using the default email client (not outlook - my company uses Lotus Notes). I have written what I think is a fairly robust script for using the MAPI API (mapi32.dll) on a Win XP Pro machine, but it errors out and none of the google results on the error are much help. Can you or someone look at the file and see what's amiss?

The zipped db (about 300kb) is here.

The email functions are in a module in the back, and the form's code has the other stuff. Only minimal test data is loaded in the db. the form that opens at startup has a list of addresses to select from, then you hit the button to send the message. It does save a small text file on your HD in the root C folder (for passing the test attachment to the email client).

Any suggestions on making this work would be appreciated...

* The optimist says the cup is half full. The pessimist says it's half empty. But the engineer knows the truth - the cup's design is incorrectly sized.
Go to Top of Page

ruirib
Snitz Forums Admin

Portugal
26364 Posts

Posted - 09 June 2005 :  16:42:34  Show Profile  Send ruirib a Yahoo! Message
gelliot,

I don't know the MAPI API. I have never used it.

Shaggy, how did this finish? Did you manage to get it working?


Snitz 3.4 Readme | Like the support? Support Snitz too
Go to Top of Page

Shaggy
Support Moderator

Ireland
6780 Posts

Posted - 10 June 2005 :  04:53:28  Show Profile
Got distracted by a mountain of work, Rui (this was just me planning a bit ahead). Have that page bookmarked so hopefully I'll be back to it some time next week.


Search is your friend
“I was having a mildly paranoid day, mostly due to the
fact that the mad priest lady from over the river had
taken to nailing weasels to my front door again.”
Go to Top of Page
Page: of 3 Previous Topic Topic Next Topic  
Previous Page | Next Page
 New Topic  Topic Locked
 Printer Friendly
Jump To:
Snitz Forums 2000 © 2000-2021 Snitz™ Communications Go To Top Of Page
This page was generated in 0.3 seconds. Powered By: Snitz Forums 2000 Version 3.4.07