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 - Using Forms
Site Map Home Register Authors List Search Today's Posts Mark Forums Read Web Partners

Attach VB Code to Form?



 
 
Thread Tools Search this Thread Display Modes
  #1  
Old August 17th 07, 02:10 AM posted to microsoft.public.outlook.program_forms
G
external usenet poster
 
Posts: 25
Default Attach VB Code to Form?

I'm relatively new at form design (but have some VB experience) ... how do
you 'attach' VB code to a form? I tried creating a button control, but there
doesn't appear to be a way to attach the code (a la Access).

Thanks.

G
Ads
  #2  
Old August 17th 07, 06:08 AM posted to microsoft.public.outlook.program_forms
Sue Mosher [MVP-Outlook]
external usenet poster
 
Posts: 11,651
Default Attach VB Code to Form?

You click the View Code button on the toolbars or menu and then type the control into the code window that appears, affectionately known to Outlook developers as "Visual Notepad." The code is VBScript, not VB. For a commandbutton, only the Click event is supported.

--
Sue Mosher, Outlook MVP
Author of Microsoft Outlook 2007 Programming:
Jumpstart for Power Users and Administrators
http://www.outlookcode.com/article.aspx?id=54


"G" wrote in message news
I'm relatively new at form design (but have some VB experience) ... how do
you 'attach' VB code to a form? I tried creating a button control, but there
doesn't appear to be a way to attach the code (a la Access).

Thanks.

G

  #3  
Old August 20th 07, 03:20 PM posted to microsoft.public.outlook.program_forms
G
external usenet poster
 
Posts: 25
Default Attach VB Code to Form?

Thanks, Sue. On another note, I downloaded your forms routing message
(http://www.outlookcode.com/d/forms/routemsg.htm) and when I select FORMS |
View Code (in design mode), nothing appears.

I'm running Outlook 2003 (SP2). Am I doing something wrong?

Thanks.

G


"Sue Mosher [MVP-Outlook]" wrote:

You click the View Code button on the toolbars or menu and then type the control into the code window that appears, affectionately known to Outlook developers as "Visual Notepad." The code is VBScript, not VB. For a commandbutton, only the Click event is supported.

--
Sue Mosher, Outlook MVP
Author of Microsoft Outlook 2007 Programming:
Jumpstart for Power Users and Administrators
http://www.outlookcode.com/article.aspx?id=54


"G" wrote in message news
I'm relatively new at form design (but have some VB experience) ... how do
you 'attach' VB code to a form? I tried creating a button control, but there
doesn't appear to be a way to attach the code (a la Access).

Thanks.

G


  #4  
Old August 20th 07, 04:38 PM posted to microsoft.public.outlook.program_forms
Sue Mosher [MVP-Outlook]
external usenet poster
 
Posts: 11,651
Default Attach VB Code to Form?

How did you open the .oft file in design mode? You should use Tools | Forms | Design a Form.
--
Sue Mosher, Outlook MVP
Author of Microsoft Outlook 2007 Programming:
Jumpstart for Power Users and Administrators
http://www.outlookcode.com/article.aspx?id=54


"G" wrote in message ...
Thanks, Sue. On another note, I downloaded your forms routing message
(http://www.outlookcode.com/d/forms/routemsg.htm) and when I select FORMS |
View Code (in design mode), nothing appears.

I'm running Outlook 2003 (SP2). Am I doing something wrong?

Thanks.

G


"Sue Mosher [MVP-Outlook]" wrote:

You click the View Code button on the toolbars or menu and then type the control into the code window that appears, affectionately known to Outlook developers as "Visual Notepad." The code is VBScript, not VB. For a commandbutton, only the Click event is supported.



"G" wrote in message news
I'm relatively new at form design (but have some VB experience) ... how do
you 'attach' VB code to a form? I tried creating a button control, but there
doesn't appear to be a way to attach the code (a la Access).

Thanks.

G


  #5  
Old August 20th 07, 06:42 PM posted to microsoft.public.outlook.program_forms
G
external usenet poster
 
Posts: 25
Default Attach VB Code to Form?

Thanks, that did it. I can see the code.

On to the next issue ... When I CHOOSE the form (after publishing it) and
send it to another user on our email system, they get the message "Form you
selected cannot be displayed" error (when hitting the ROUTE button).

Any suggestions? Thanks.

G


"Sue Mosher [MVP-Outlook]" wrote:

How did you open the .oft file in design mode? You should use Tools | Forms | Design a Form.
--
Sue Mosher, Outlook MVP
Author of Microsoft Outlook 2007 Programming:
Jumpstart for Power Users and Administrators
http://www.outlookcode.com/article.aspx?id=54


"G" wrote in message ...
Thanks, Sue. On another note, I downloaded your forms routing message
(http://www.outlookcode.com/d/forms/routemsg.htm) and when I select FORMS |
View Code (in design mode), nothing appears.

I'm running Outlook 2003 (SP2). Am I doing something wrong?

Thanks.

G


"Sue Mosher [MVP-Outlook]" wrote:

You click the View Code button on the toolbars or menu and then type the control into the code window that appears, affectionately known to Outlook developers as "Visual Notepad." The code is VBScript, not VB. For a commandbutton, only the Click event is supported.



"G" wrote in message news I'm relatively new at form design (but have some VB experience) ... how do
you 'attach' VB code to a form? I tried creating a button control, but there
doesn't appear to be a way to attach the code (a la Access).

Thanks.

G


  #6  
Old August 20th 07, 08:45 PM posted to microsoft.public.outlook.program_forms
Ken Slovak - [MVP - Outlook]
external usenet poster
 
Posts: 5,848
Default Attach VB Code to Form?

Each recipient will need to have the form published to their Organizational
Forms Library or their Personal Forms Library. That's all detailed in the
instructions for the form on the download page. Study what that page says,
it's very helpful.

--
Ken Slovak
[MVP - Outlook]
http://www.slovaktech.com
Author: Professional Programming Outlook 2007
Reminder Manager, Extended Reminders, Attachment Options
http://www.slovaktech.com/products.htm


"G" wrote in message
...
Thanks, that did it. I can see the code.

On to the next issue ... When I CHOOSE the form (after publishing it) and
send it to another user on our email system, they get the message "Form
you
selected cannot be displayed" error (when hitting the ROUTE button).

Any suggestions? Thanks.

G


 




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
VBA Code on Message form to take me to Appointment form LDMueller Outlook and VBA 10 June 14th 07 03:10 PM
Outlook 2007 Task Form Insert Ribbon (Attach Group) [email protected] Outlook - General Queries 9 April 26th 07 07:38 PM
How to replace Default Contact form with Customised conact form using VBScript code Satish Boddapati Outlook - Using Contacts 0 October 12th 06 08:20 AM
How to replace Default Contact form with Customised conact form using VBScript code Satish Boddapati Outlook - Installation 0 October 12th 06 08:19 AM
Code to attach more than 1 document Jas Outlook and VBA 1 March 22nd 06 06:41 AM


All times are GMT +1. The time now is 12:26 AM.


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