VBScript vs VBA

G

Guest

Hi,

I am a bit new to the outlook programming and a bit confused on the type of
progamming required for forms.

Does forms require VBScript or VBA to allow actions to be performed?

When i creat a form using the toolbox and other features, how come when i
want to view the code (pressing Alt + F11), there are nothing in Microsoft
Visual Basic? Did I creat the form wrong?

Thanks muchly for any help

JM
 
H

Hollis D. Paul

Does forms require VBScript or VBA to allow actions to be performed?

When i creat a form using the toolbox and other features, how come when i
want to view the code (pressing Alt + F11), there are nothing in Microsoft
Visual Basic? Did I creat the form wrong?
You only use VBScript inside a form. If you add code through the Outlook
Code Editor, it exists as code behind the form--specifically, it is saved
with the form definition when you publish the form. No code that is entered
into the form's editor appears in the VBA Project1's modules. You can call
subroutines in the ThisOutlookModule, but the form's code does not reside in
the module.

In Outlook, the VBA project is best viewed as an application-wide facility.
If you want to change the appearance of operation of Outlook, as an
application, then you put your code there. If you want something to happen
when a data items are married on the screen to a specific form, then you put
the code in the form, using VBScript and the Outlook code editor.

Hollis D. Paul [MVP - Outlook]
(e-mail address removed)
Mukilteo, WA USA
 
G

Guest

Thanks for your help!

This means that if i am to manipulate any functions of the form (such as
sending items) I need to code that in VBScript?

Are there specific VBScript functions for outlook?
I have been doing some reading and so far CDO looks most relevant but are
there examples as to how to integrate VBScript codes into outlook.
I have tried out a couple of examples myself (such as using msg.send and
"smtpserver") but nothing seems to work. could this be due to my mail server
settings?

Thanks heaps!
JM


Hollis D. Paul said:
Does forms require VBScript or VBA to allow actions to be performed?

When i creat a form using the toolbox and other features, how come when i
want to view the code (pressing Alt + F11), there are nothing in Microsoft
Visual Basic? Did I creat the form wrong?
You only use VBScript inside a form. If you add code through the Outlook
Code Editor, it exists as code behind the form--specifically, it is saved
with the form definition when you publish the form. No code that is entered
into the form's editor appears in the VBA Project1's modules. You can call
subroutines in the ThisOutlookModule, but the form's code does not reside in
the module.

In Outlook, the VBA project is best viewed as an application-wide facility.
If you want to change the appearance of operation of Outlook, as an
application, then you put your code there. If you want something to happen
when a data items are married on the screen to a specific form, then you put
the code in the form, using VBScript and the Outlook code editor.

Hollis D. Paul [MVP - Outlook]
(e-mail address removed)
Mukilteo, WA USA
 
H

Hollis D. Paul

Are there specific VBScript functions for outlook?
I have been doing some reading and so far CDO looks most relevant but are
there examples as to how to integrate VBScript codes into outlook.
I have tried out a couple of examples myself (such as using msg.send and
"smtpserver") but nothing seems to work. could this be due to my mail server
settings?
CDO is a real pig to work with--strangely organized, dirty and slippery.
VBScript looks like VB code, only some VB and VBA functions don't work in
VBScript. Go pick up some code examples from www.slipstick.com and
www.outlookcode.com. You'll see what I mean about VBScript.

Hollis D. Paul [MVP - Outlook]
(e-mail address removed)
Using Virtual Access 4.52 build 277 (32-bit), Windows 2000 build 2600
http://search.support.microsoft.com/kb/c.asp?FR=0&SD=TECH&LN=EN-US

Mukilteo, WA USA
 
G

Guest

thanks for your help! =)

Hollis D. Paul said:
Are there specific VBScript functions for outlook?
I have been doing some reading and so far CDO looks most relevant but are
there examples as to how to integrate VBScript codes into outlook.
I have tried out a couple of examples myself (such as using msg.send and
"smtpserver") but nothing seems to work. could this be due to my mail server
settings?
CDO is a real pig to work with--strangely organized, dirty and slippery.
VBScript looks like VB code, only some VB and VBA functions don't work in
VBScript. Go pick up some code examples from www.slipstick.com and
www.outlookcode.com. You'll see what I mean about VBScript.

Hollis D. Paul [MVP - Outlook]
(e-mail address removed)
Using Virtual Access 4.52 build 277 (32-bit), Windows 2000 build 2600
http://search.support.microsoft.com/kb/c.asp?FR=0&SD=TECH&LN=EN-US

Mukilteo, WA USA
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top