A Microsoft Outlook email forum. Outlook Banter

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » Outlook Banter forum » Microsoft Outlook Email Newsgroups » Outlook - General Queries
Site Map Home Register Authors List Search Today's Posts Mark Forums Read Web Partners

installing VB script



 
 
Thread Tools Search this Thread Display Modes
  #1  
Old March 20th 06, 10:34 PM posted to microsoft.public.outlook
windandwaves
external usenet poster
 
Posts: 18
Default installing VB script

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




  #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




  #3  
Old March 20th 06, 11:10 PM posted to microsoft.public.outlook,microsoft.public.outlook.program_vba
windandwaves
external usenet poster
 
Posts: 18
Default installing VB script

Sue Mosher [MVP-Outlook] wrote:
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.


Hey Sue,
thank you for your reply. much appreciated. is there anything more
sophisticated then the method you outline above? my client is a novice,
novice and I would prefer a simple installer as it would look more
professional.

TIA

Nicolaas


PS my next question is how I can create a button in outlook that calls the
code.


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


"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



  #4  
Old March 20th 06, 11:17 PM posted to microsoft.public.outlook,microsoft.public.outlook.program_vba
Sue Mosher [MVP-Outlook]
external usenet poster
 
Posts: 11,651
Default installing VB script

There is no programmatic way to install VBA code. Maybe you should be building them a COM addin instead? Or take out the variable data typing so you can redo it as a VBSCript .vbs file.

--
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 ...
Sue Mosher [MVP-Outlook] wrote:
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.


Hey Sue,
thank you for your reply. much appreciated. is there anything more
sophisticated then the method you outline above? my client is a novice,
novice and I would prefer a simple installer as it would look more
professional.

TIA

Nicolaas


PS my next question is how I can create a button in outlook that calls the
code.


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


"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



  #5  
Old March 21st 06, 12:39 AM posted to microsoft.public.outlook,microsoft.public.outlook.program_vba
windandwaves
external usenet poster
 
Posts: 18
Default installing VB script

Sue Mosher [MVP-Outlook] wrote:
There is no programmatic way to install VBA code. Maybe you should be
building them a COM addin instead? Or take out the variable data
typing so you can redo it as a VBSCript .vbs file.


What would you recommend. I checked out Com Addin and I need all sorts of
software for that I believe. VBscript may be a better option. Do you know
any good places where I can find help for this.

Thanks again.

Nicolaas



  #6  
Old March 21st 06, 05:53 AM posted to microsoft.public.outlook,microsoft.public.outlook.program_vba
Sue Mosher [MVP-Outlook]
external usenet poster
 
Posts: 11,651
Default installing VB script

This newsgroup covers VBScript applications of Outlook programming techniques, as well as VBA. Basically, all you need to do is:

-- remove the data typing from variable and procedure declarations
-- declare any Outlook constants or use the literal values
-- instantiate an Outlook.Application object with CreateObject()

--
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 ...
Sue Mosher [MVP-Outlook] wrote:
There is no programmatic way to install VBA code. Maybe you should be
building them a COM addin instead? Or take out the variable data
typing so you can redo it as a VBSCript .vbs file.


What would you recommend. I checked out Com Addin and I need all sorts of
software for that I believe. VBscript may be a better option. Do you know
any good places where I can find help for this.

Thanks again.

Nicolaas



 




Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
installing an old personal folder Atiba8 Outlook - Installation 1 March 14th 06 10:17 AM
Installing Outlook on New Server John Outlook - Installation 3 February 18th 06 03:53 PM
installing outlook live hans Outlook - Installation 1 February 16th 06 04:38 AM
Installing Business Contact Manager Tech-Duke Outlook - Installation 0 January 13th 06 03:21 AM
Since installing Visio 2003, I do not get any Outlook journal trueblueroo Outlook - Installation 0 January 9th 06 06:00 PM


All times are GMT +1. The time now is 08:45 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.Search Engine Friendly URLs by vBSEO 2.4.0
Copyright ©2004-2025 Outlook Banter.
The comments are property of their posters.