Blue Theme Orange Theme Green Theme Red Theme
 
Team Foundation Server Hosting
Home | Forums | ASP.NET 2.0 Tutorials | Web Services | How Do I...? | Class Browser | WPF Quick Starts | Advertise with Us
 | Consulting  
Submit an Article Submit a Blog 
 Jump to
Skip Navigation Links
TechnologyExpand Technology
WebsiteExpand Website
Nevron Gauge for SharePoint
Search :       Advanced Search »
Home » .NET 3.0 » Design Outlook 2007 Form

Design Outlook 2007 Form

In this topic I’ll illustrate How to design outlook 2007 form and How to call our form in the easiest way available.

Page Views : 2119
Downloads : 0
Rating :
 Rate it
Level : Beginner
   Print Read/Post comments Post a comment  Similar Articles  
   Email to a friend  Bookmark  Author's other articles  
 
6 Months Free & No Setup Fees ASP.NET Hosting!
Become a Sponsor
 Tag Cloud
 Latest Jobs
More ... 
 Latest Interview Questions
More ... 


In this topic I'll illustrate :

1. How to design outlook 2007 form.
2. How to call our form in the easiest way available.

Let us start

1. How to design a form :

1.1: Open MSWORD ! from office icon choose word options.

From popular click on Show developer on the ribbon – select it.

Close MSWORD . ( see figure 1.1 )

design1.gif

Figure ( 1.1 ) activate develop pane shown in step (1.3)

1.2: from outlook click on new message , prepare your message stamp as you need (From, to , CC and inter message text , format it ) you can inter your signature too .

In my example my form shown as in figure (1.2 )

design2.gif

Figure ( 1.2 ) my example form

1.3: click on develop pane then click on design this form ( see figure 1.3 ).

design3.gif

Figure ( 1.3 )

1.4: now you converted to design mode note that field from not appear , so from properties pane click field chooser then choose address fields ( see figure 1.4 ) .

design4.gif

Figure ( 1.4 )

1.4.2: from address fields drag from and drop it in top of to location and note that from field will auto filled with mail you write it in step 1.2 . ( see figure 1.5 )

Notes :

* you can also add BCC field and do a lot of changes in any field ( like make from field read only , validate field values …….. etc ) just right click on the field and choose properties from shortcut menu and take a look about what you can do .

* you can't add text to message text from design mode if you need to do that back to step 1.2 .

design5.gif

Figure ( 1.5 ) adding from field to our form

1.4.3. now from developer pane click on Publish choose Publish form , publish form dialog box will appear from look in select personal forms library and write your form name then click publish . ( see figure 1.6 )

Notes :
* you can publish your form in outlook folder and select folder ( inbox , sent items , drafts … etc ) and the form will appear in the selected folder but after using it , it will be deleted from the folder and you will need to publish it again ! .
* Form name I recommend writing it without any spaces because we will use it in macro code in step 2.1 and I recommend writing it in English not in Arabic .

design6.gif

Figure ( 1.6 )

1.4.4. close design pane and don't save the form you needn't that .

1.5. now let us use this form from tools menu choose forms then choose form , choose form dialog box will appear from look in choose personal forms library then select your form and click open .
But that's a too long way to call your form every time you need it so let us make it too easy to call your form .

2. How to call your form in the easiest way available .

( Now we will call our form with one click from tool bar  just follow me )
2.1. from tools menu choose macro then choose macros , macros dialog box will appear write your Macro name and then click create , now VBA " Visual Basic for Applications " programming environment opened as in figure 1.7 . ( don't worry ) you just need to copy below code in this environment as the following .

Code : ( read notes after figure 1.7 for red word in the code )

strForm = "IPM.Note.FromCC"
Set objFolder = Application.ActiveExplorer.CurrentFolder
Set objItem = objFolder.Items.Add(strForm)
objItem.Display

design7.gif

Figure ( 1.7 ) VBA environment

Notes :.

* don't do anything more than what I say in this environment .
* area in red rectangle is the code that you need to write and note that :.
. first and last line auto written and after word Sub note that its your macro name .
. copy my above mentioned code and paste it BETWEEN first and second lines .
* you MUST replace RED word in my code with your FORM NAME and DON'T DELETE ANY CHARACTER OR PUT ANY SPACES OR DOTS

2.2. close VBA and don't worry about saving data .

2.3. now we returned to outlook ( do you still with me  ) from view menu choose toolbar choose customize .

2.3.2. customize dialog box opened from commands tab from categories group select macros your macro will appear on your left hand drag and drop it any where in tool bar ( you can click on modify selection and rename button name ) . see figure ( 1.8 )

design8.gif

Figure ( 1.8 )

2.3.3. close customize dialog box .

2.4. now simply click on your macro button to call your form.

Notes :

* too add another form repeat all above mentioned steps and note that in step 2.1 in VBA environment you will find your first code written just copy new code between new macro lines and rename red word with your new form name , code will appear as the following

design9.gif

* macro name mustn't be the same with any VBA code !!! OK Ok OK if you write macro name and you find create button disabled then rename macro name , to explain that try to name the macro ( sub , end , unlock ………. ) .
* you can create new tool bar name it as you like , position it under new message button and put your macros in it , it will appear as the following .

design10.gif

* when you close your Outlook you will asked to save PROJECT click YES .
* our macro code need to be trusted to use , trusted comes by sign our code with digital signature which not allowed So when you open outlook again macro will not running unless you do the following :

From tools menu click Trusted Center then choose macro security and from right pane select no security checks for macro then click OK and then restart your outlook .

design11.gif

Thanks

Ehab Ragab
  

Comment Request!
Thank you for reading this post. Please post your feedback, question, or comments about this post Here.
Login to add your contents and source code to this article
 [Top] Rate this article
 
 About the author
 
Ehab Ragab
Looking for C# Consulting?
C# Consulting is founded in 2002 by the founders of C# Corner. Unlike a traditional consulting company, our consultants are well-known experts in .NET and many of them are MVPs, authors, and trainers. We specialize in Microsoft .NET development and utilize Agile Development and Extreme Programming practices to provide fast pace quick turnaround results. Our software development model is a mix of Agile Development, traditional SDLC, and Waterfall models.
Click here to learn more about C# Consulting.
 
Introducing MaxV - one click. infinite control. Hyper-V Hosting from MaximumASP.
Finally – a virtual platform that delivers next-generation Windows Server 2008 Hyper-V virtualization technology from a managed hosting partner you can truly depend on. Visit www.maximumasp.com/max for a FREE 30 day trial. Hurry offer ends soon. Climb aboard the MaxV platform and take advantage of High Availability, Intelligent Monitoring, Recurrent Backups, and Scalability – with no hassle or hidden fees. As a managed hosting partner focused solely on Microsoft technologies since 2000, MaximumASP is uniquely qualified to provide the superior support that our business is built on. Unparalleled expertise with Microsoft technologies lead to working directly with Microsoft as first to offer IIS 7 and SQL 2008 betas in a hosted environment; partnering in the Go Live Program for Hyper-V; and product co-launches built on WS 2008 with Hyper-V technology.
Dynamic PDF
ceTE software specializes in components for dynamic PDF generation and manipulation. The DynamicPDF™ product line allows you to dynamically generate PDF documents, merge PDF documents and new content to existing PDF documents from within your applications.
Nevron Chart for .NET 2010.1 Now Available
The leading .NET charting control now features PDF, Flash and Silverlight export, visualization of large datasets and more. Deliver true charting functionality to your BI, Scorecard, Presentation or Scientific apps. Download evaluation now.
ASP.NET 4 Hosting
Get 2 Months Free of ASP.NET Hosting for Only $4.95/month! Receive FREE MS SQL and MySQL Databases Including ASP.NET 4/3.5, MVC 3.0, Silverlight 4, Windows 2008/IIS 7.0 Plus FREE IIS 7 Modules. Host UNLIMITED ASP.NET Web Sites – Click Here!
 
 Post a Feedback, Comment, or Question about this article
Subject:
Comment:
6 Months Free & No Setup Fees ASP.NET Hosting!
Become a Sponsor
 Comments
Team Foundation Server Hosting
 © 2012  contents copyright of their authors. Rest everything copyright Mindcracker. All rights reserved.