devxlogo

Tip Bank

Sending Email Using CDO and MAPI

Sending emails via code used to be cool, but now it is a necessity. Below is code to send email via CDO. If the CDO call fails, it will send

The beginning or end of previous week

For reporting, many times you need to figure out what date last week began and ended. Use the code below to figure that out: Dim vntBegin As variantDim vntEnd As

Send HTML Email via CDO

Ever wonder how to send email that looks like a web page? Here is how you do it. Note: You must have CDO for NT referenced for this to work.

MSExcel – A class for writing Excel spreadsheets

‘***********************************************************’* Module Name: MSExcel’* Author: Steve Miller’* Date: 11/22/98’* Description: Encapsulates and eases the chore of writing to an Excel ‘ spreadsheet.’*’* IMPORTANT: requires that you have a reference to

IsValidPhoneField – Check whether a phone number is valid

‘ Validate attributes of Phone data’ Returns True if valid, False if invalid” Also returns the phone in formatted fashion (USA format).’ Will convert alphabetics to numeric”Example:’ If IsValidPhoneField(Value:=”3034414444″, ReformattedPhone:=strNewPhone,’

IsValidSSN – Check a Social Security Number value

‘ Validates attributes of the SSN’ Returns True if valid, False if invalid”Example:’ If IsValidSSN(Value:=”333-44-3333″, IsRequired:=True) then …Function IsValidSSN(ByRef Value As String, Optional ByVal IsRequired As Boolean _ = True)