![]() |
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. |
|
|
Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
![]()
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
|
|||
|
|||
![]()
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
|
|||
|
|||
![]()
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
|
|||
|
|||
![]()
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
|
|||
|
|||
![]()
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
|
|||
|
|||
![]()
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 |
Display Modes | |
|
|
![]() |
||||
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 |