We are currently looking for quality source code contributions for publication in Code of the Week. We are offering to pay from $25 to $200 for each submission we use. The amount primarily depends on the complexity of the source code. An issue like this one would be about $25 to $50. An issue like http://www.codeoftheweek.com/issues/0067.html would get $200 (maybe more).
If you have source code that you would like to submit, use our online submission form at http://www.codeoftheweek.com/submission.html
Be sure to fill out your name and address information so we can mail you your check upon publication.
If you would like to make some extra cash for surfing the web, jump to http://www.codeoftheweek.com/paidsurf.html
In this issue we discuss how to send a message using the Outlook Object Model.
If you have any questions about using this module, let us know at questions@codeoftheweek.com
The basOutlook module contains a single routine that calls several methods within the Outlook object model. In the past we have covered other methods to send email messages (using features such as SMTP and MAPI). This one is very simple, but assumes the user of this software has Outlook installed on their computer.
In a future issue we will expand on this code to show how to send attachments, use the CC and BCC address fields and other useful Outlook messaging features. Send a message to outlook@codeoftheweek.com if you are interested in seeing more about this.
Public Sub OutlookSendMessage(sRecipient As String, sSubject As String, _ sMessage As String, _ Optional eImportance As OlImportance = olImportanceNormal)
sRecipient is the email address you want to send the message to, such as info@codeoftheweek.com or just "John Doe" (if you are either running a mail system that will resolve the name or have a contact added called John Doe). sSubject is the subject of the message and sMessage is the content of the message. sMessage can contain new line characters and can be pretty much unlimited in length; although you probably do not want to send a message that is too long. eImportance marks the message with one of the following: olImportanceHigh, olImportanceLow or olImportanceNormal. This option is not supported on all mail systems.
The below sample shows how to send a message using the OutlookSendMessage routine.
OutlookSendMessage "info@codeoftheweek.com", "Order Now!", "Please place your order now!"
To see the source code for this issue you must be a subscriber to Code of the Week. If you are a subscriber the source code is available at the following address: http://www.codeoftheweek.com/membersonly/bi/0112.html
If you would like to get paid for surfing the web, jump to http://www.codeoftheweek.com/paidsurf.html