View Single Post
  #2  
Old March 20th 06, 10:58 PM posted to microsoft.public.outlook
Sue Mosher [MVP-Outlook]
external usenet poster
 
Posts: 11,651
Default installing VB script

Copy and paste it into a Notepad text file and email that file to him along with instructions for how to copy and paste the code into a module in the Outlook VBA environment.

FYI, there is a newsgroup specifically for general Outlook programming issues "down the hall" at microsoft.public.outlook.program_vba or, via web interface, at http://www.microsoft.com/office/comm....program_v ba

--
Sue Mosher, Outlook MVP
Author of Configuring Microsoft Outlook 2003
http://www.turtleflock.com/olconfig/index.htm
and Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers
http://www.outlookcode.com/jumpstart.aspx

"windandwaves" wrote in message ...
Hi Gurus

I have written a piece of VB script (see below). I want to send this to a
client so that he can install it. My question is, how can I send that best.
I know they have access so should i put it in access and then export from
there into outlook?

Any help greatly appreciated (this is all new to me)

Nicolaas




Sub CreateHTMLMail()
'Creates a new e-mail item and modifies its properties.
Dim olApp As Outlook.Application
Dim objMail As Outlook.MailItem
Set olApp = Outlook.Application
'Create e-mail item
Set objMail = olApp.CreateItem(olMailItem)

With objMail
'Set body format to HTML
.BodyFormat = olFormatHTML
.HTMLBody = go()
.Display
End With
End Sub



Function go()
Dim Fs
Dim A
Dim PathandFile As String
'-
PathandFile = "c:\testfile.htm"
Set Fs = CreateObject("Scripting.FileSystemObject")
Set A = Fs.OpenTextFile(PathandFile)
'read rest of the file
Do While A.AtEndOfStream True
ReadFile = ReadFile & Trim(A.ReadLine)
Loop
A.Close
'-check last line
go = strtext
End Function




Ads