Suresh Behera

The Microsoft .Net Junkies

News

Blogroll

Reading

December 2004 - Posts

Microsoft Office Server-Side Programming :VSTO 2005

                                    It was long wating Microsoft Office Server side programming now come true.Since the data is now separate from the view, it is possible to manipulate the data in a document without starting Office using the ServerDocument class. This is different than the current model, where in order for code to manipulate the contents of the document, you have to have Word or Excel running. Having to run Word or Excel blocks a common solution requirement, that is, creating Office documents from an ASP.NET application. Office applications are intended for use in client environments; they are not designed to be run on a server.

You can start the Visual Studio Tools for Office, Version 2005 Beta 1 runtime on a server without running Word or Excel. You can manipulate the data island in a document from any server-side code. When the user opens the associated Office document the view synchronizes to the data island by using data binding, and the user is presented with the updated data.

In this model, you do not need Word and Excel to write to the data on the server, only to view it on the client. You do not even need Word and Excel installed on the server. This provides improved scalability and the ability to perform fast batch processing of documents containing data islands on the server.

Your Office document functions as a repository for data, because programmatic access to the data embedded in the document is enabled. Code on the server (for example, in an ASP.NET page) can customize the data in the document and serve up the customized document. When the user opens the document, data binding code in the assembly binds the customized data into the view.

For more ...

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/odc_vsto2003_ta/html/VBAConvert.asp

Suresh Behera

What's New in Visual Studio Tools for Office, Version 2005

      Now it is time to move Visual Studio Tools for Office, Version 2005 (VSTO 2.0)

                  Microsoft Visual Studio Tools for the Microsoft Office System, Version 2005 Beta 1 includes new features that were not part of Visual Studio Tools for the Microsoft Office System, Version 2003. These new features include the project system, a visual designer for Microsoft Office Word 2003 and Microsoft Office Excel 2003, view controls, actions pane support, visual data binding, data caching, and server-side programming. (10 printed pages)

Contents

Introduction
Project System
Visual Designer
Controls
Actions Pane Support
Data Programming
Data Caching
Server-Side Programming
Additional Resources

For More .. http://msdn.microsoft.com/library/default.asp?url=/library/en-us/odc_vsto2003_ta/html/VBAConvert.asp

Suresh Behera

Posted: Dec 28 2004, 02:44 PM by Suresh Behera | with no comments
Filed under:
Converting Code from VBA to Visual Basic .NET

               Nice article for VBA developer

                  Presents issues to consider when converting your Microsoft Office solutions from Visual Basic for Applications (VBA) to Visual Basic .NET. Provides a general overview of their differences, and then uses examples from Word and Excel to describe how you can use Visual Studio Tools for the Microsoft Office System to convert your code. (20 printed pages)

Contents

Introduction
Should I Convert my VBA Code to Visual Basic .NET?
Differences Between VBA and Visual Basic .NET
   Language Differences
   Project Management Differences
   Security Differences
   Deployment Differences
Converting VBA Code
   VBA Code Example in Word
   VBA Code Example in Excel
Conclusion
Appendix
Related Articles

For more ...http://msdn.microsoft.com/library/default.asp?url=/library/en-us/odc_vsto2003_ta/html/VBAConvert.asp

Suresh Behera

Posted: Dec 28 2004, 02:04 PM by Suresh Behera | with no comments
Filed under:
.NET Security: Lessons Learned and Missed from Java

 Worth to read it ...                 

               Many systems execute untrusted programs in virtual machines (VMs) to limit their access to system resources. Sun introduced the Java VM in 1995, primarily intended as a lightweight platform for
execution of untrusted code inside web pages. More recently, Microsoft developed the .NET platform with
similar goals. Both platforms share many design and implementation properties, but there are key
differences between Java and .NET that have an impact on their security. This paper examines how
.NET’s design avoids vulnerabilities and limitations discovered in Java and discusses lessons learned (and
missed) from Java’s experience with security. ........................

               ..............Java and .NET have similar security goals and mechanisms. .NET’s design benefited from past experience with Java. Examples of this cleaner design include the MSIL instruction set, code access security evidences, and the policy configuration. .NET has been able to shield the developer from some of the complexity through their new architecture.

For more....

http://www.cs.virginia.edu/~evans/pubs/acsac-packaged.pdf

Suresh Behera

MS Office Knowledge Bits

Microsoft Access

=========================

839781

You may receive an error message when you try to open a data access page in Access 2002

http://support.microsoft.com/?kbid=839781

Applies to: Microsoft Access 2002


Some new content published recently on Office online:
 

Title: Frequently asked questions about Access security warnings

URL: http://office.microsoft.com/assistance/preview.aspx?AssetID=HA011225981033
 

Title: Create, change, or remove passwords (MDB)

URL: http://office.microsoft.com/assistance/preview.aspx?AssetID=HP051882751033


Title: Ways to report data in Access

URL: http://office.microsoft.com/assistance/preview.aspx?AssetID=HA010448581033

 

 

Microsoft Excel

=========================

841366

Excel 2002 post-Service Pack 3 hotfix package: May 13, 2004

http://support.microsoft.com/?kbid=841366

Applies to: Microsoft Excel 2002

 

842305

Recalculation of cell range takes longer than expected in Excel 2002

http://support.microsoft.com/?kbid=842305

Applies to: Microsoft Excel 2002

 

Some new content published recently on Office online:

 

Title: About statistical analysis tools

http://office.microsoft.com/assistance/preview.aspx?AssetID=HP052038731033

 

Title: Perform a statistical analysis

http://office.microsoft.com/assistance/preview.aspx?AssetID=HP052016751033

 

 

 

Microsoft Project

=========================

327325

"The file cannot be found" error message when you click a cell in the Predecessors table when you create a cross-project link in Project 2000

http://support.microsoft.com/?kbid=327325

Applies to: Microsoft Project 2000

 

832367

PWA stops responding when you try to update your timesheet in Project Server 2003

http://support.microsoft.com/?kbid=832367

Applies to: Microsoft Office Project Server 2003

 

838017

The plan is not deleted and you receive a "timeout" error message when you try to delete a large plan from your Project Server 2002 database

http://support.microsoft.com/?kbid=838017

Applies to: Microsoft Project Server 2002

 

838347

Other project plans are missing in Project Center after you publish your

http://support.microsoft.com/?kbid=838347

Applies to:

NOTE: Part of the Partner KB; partial title included at this time.

 

838888

Description of the Microsoft Project Server 2002 hotfix package: April 27, 2004

http://support.microsoft.com/?kbid=838888

Applies to: Microsoft Project Server 2002

 

840314

Task data may disappear or value custom field values in a task may be missing when you make changes to enterprise custom fields in your Master Project File in Project 2003

http://support.microsoft.com/?kbid=840314

Applies to: Microsoft Office Project Professional 2003; Microsoft Office Project Server 2003

 

840701

How to install SharePoint Portal Server 2003, Windows SharePoint Services, and Project Server 2003 on the same server

http://support.microsoft.com/?kbid=840701

Applies to: Microsoft Office Project Server 2003; Microsoft Office SharePoint Portal Server 2003; Microsoft Windows SharePoint Services

 

840702

The file does not save and you receive an error message when you try to save a Microsoft Project 2000 file to a Microsoft Project Server 2002 database

http://support.microsoft.com/?kbid=840702

Applies to: Microsoft Project Server 2002; Microsoft Project 2000

 

841003

"An error has occurred while collecting data for Administrative Templates" error message when you apply the Project 2003 policy template (Proj11.adm) to a Windows Server 2003 domain

http://support.microsoft.com/?kbid=841003

Applies to: Microsoft Office Project Standard 2003; Microsoft Office Project Professional 2003

 

841004

"An error has occurred while collecting data for Administrative Templates" error message when you apply the Project 2002 system policy template (Proj10.adm) to a Windows Server 2003 domain

http://support.microsoft.com/?kbid=841004

Applies to: Microsoft Project Professional 2002; Microsoft Project Standard 2002

 

841353

Microsoft Project Server 2002 post-Service Pack 1 hotfix package: April 30, 2004

http://support.microsoft.com/?kbid=841353

Applies to: Microsoft Project Server 2002

 

835713

Microsoft Project Professional 2002 and Microsoft Project Server 2002 post-Service Pack 1 hotfix package: April 27, 2004

http://support.microsoft.com/?kbid=835713

Applies to: Microsoft Project Professional 2002; Microsoft Project Server 2002

 

837653

"Microsoft Project was unable to establish a connection with the selected Microsoft Project Server" error message when you log on to Microsoft Project Server 2002

http://support.microsoft.com/?kbid=837653

Applies to: Microsoft Office Project Server 2003; Microsoft Office Project Professional 2003; Microsoft Project Server 2002; Microsoft Project Professional 2002

 

 

II.          Opportunities/Cool Stuff

 

Brian Kennemer just authored a new MVP KB:

555120

"Error when creating site. Site does not seem to exist" Error when creating WSS Site

http://support.microsoft.com/?kbid=555120

 

Suresh Behera

Best of Blogs: Visual Studio Tools for Office, Version 2003

           There is nice article on MSDN which provides various links for VSTO.Good for VSTO developer.Just have a look on it.

Suresh Behera

                 This category contains blog articles from developers and architects who discuss how Visual Studio Tools for Office works. Also included are blog articles discussing how managed code works with Office documents.

Bookmarks in Microsoft Word

Author: Kathleen McGrath

Summary: Word Bookmarks provide a way to mark a placeholder or to insert text at a specific point in a document. They can mark anything from an insertion point to a word to an entire paragraph or section in a document. This article explains how Bookmarks work and how to use them using the Word object model.

Sharing the Same Process

Author: Eric Carter

Summary: Visual Studio Tools for Office solutions share the same process with Word or Excel, so there are a few things to keep in mind in order to "play nice." Eric explains why it is important to keep this in mind when attempting to create configuration files for Word or Excel.

Missing Arguments in C# Visual Studio Tools for Office Solutions

Author: Eric Carter

Summary: C# does not provide the same facility as Microsoft Visual Basic .NET for handling optional arguments in interop functions. Therefore, developers must make use of the Type.Missing object to handle optional arguments. Eric explains the proper way to pass missing arguments to the Office object model from C# and what happens behind the scenes.

Reason Behind the Project_bin Folder

Author: Peter Torr

Summary: The Visual Studio Tools for Office team chose to store solution assemblies in a folder called Project_bin. This article explains why this decision helps with solutions deployed to Web servers.

Where Visual Studio Tools for Office Places Assemblies

Author: Peter Torr

Summary: Visual Studio Tools for Office places project assemblies in different locations depending on how you create the project. You can create your project using a new document or an existing document. Peter explains where the assemblies build, where they load from, and what folders are added to the security policy.

Common Visual Studio Tools for Office Programming Tasks

This category contains blog articles from developers and architects who discuss common programming tasks, problems, and solutions when using Visual Studio Tools for Office.

Adding Images to Command Bar Buttons

Author: Kathleen McGrath

Summary: There is plenty of information about adding and using command bar buttons, but adding custom images to command bar buttons is not as straightforward. Kathleen walks through the task of adding images to command bar buttons using the Clipboard.

More on Adding Images to Command Bar Buttons

Author: Kathleen McGrath

Summary: This is a follow-up to Kathleen's previous article. It explains an alternative technique for adding images to command bar buttons. The Clipboard technique is an easy method for accomplishing the task, but it requires overwriting whatever information may already be on the Clipboard. The technique in this article uses the stdole2 library to convert the image and add it directly to the button.

Controlling Excel Workbook Windows from Visual Studio Tools for Office

Author: Paul Cornell

Summary: Paul provides a code example for accessing and controlling the Window object of an Excel workbook. He then discusses some of the issues that exist when you access the Windows collection and Window object from Visual Studio Tools for Office code.

Using Arrays with Visual Studio Tools for Office

Author: Paul Cornell

Summary: The Range object in Excel provides a one-based indexer into the cells contained in the Range. However, arrays in the .NET Framework are zero-based. Paul discusses some of the techniques he uses to translate and load cells into an Array object using Visual Studio Tools for Office code.

Using Excel Templates with Visual Studio Tools for Office

Author: Peter Torr

Summary: Visual Studio Tools for Office does not come with the ability to create Excel template projects; however, you can accomplish the same thing through the Excel Document project. Peter Torr explains why the Excel template project is not included in Visual Studio Tools for Office, and then he describes how to turn an Excel Document project into an Excel template.

Starting Visual Studio Tools for Office Development

This category contains blog articles about setup, project templates, Office primary interop assemblies, and other tasks relating to beginning development using Visual Studio Tools for Office.

Top 5 Loves and Hates for Visual Studio Tools for Office

Author: Julie Kremer

Summary: Julie describes the top five things she hates and the top five things she loves about Visual Studio Tools for Office. Peter Torr also suggests some solutions.

Overview of Visual Studio Tools for Office

Author: Eric Carter

Summary: Eric describes how you can use Visual Studio Tools for Office today to begin building applications for Office, using your favorite Microsoft .NET language rather than Visual Basic for Applications (VBA). He also describes how you can write .NET code to interact with other Office applications, such as Microsoft Office Outlook 2003 and Microsoft Office PowerPoint 2003, using primary interop assemblies.

Why Use Visual Studio Tools for Office?

Author: Chris Kunicki

Summary: Why would you want to use Visual Studio Tools for Office to build applications for the Microsoft Office System? Chris explains why using Visual Studio .NET is more productive because of the rich IDE and the robustness of the .NET Framework class libraries.

Securing Visual Studio Tools for Office Solutions

This category contains blog articles about protecting Office solutions using the Microsoft .NET Framework security model and articles about defending against specific security threats.

Security and Deployment Explained

Author: Paul Cornell

Summary: It is essential to understand the security settings of Visual Studio Tools for Office applications when deploying them to your end users. Paul provides a summary of some of the security documentation available on MSDN, giving a great overview of the things you need to be concerned about when deploying Visual Studio Tools for Office applications.

The Visual Studio Tools for Office Security Model

Author: Peter Torr

Summary: This article provides a detailed explanation of the Visual Studio Tools for Office security model. Peter explains how the Visual Studio Tools for Office team made some of the decisions they did, considering the security of Visual Studio Tools for Office applications.

Using Referenced Assemblies in Visual Studio Tools for Office

Author: Peter Torr

Summary: Peter describes how to use referenced assemblies in Visual Studio Tools for Office solutions, the proper way to locate where they will load from, and how to register them for Full Trust with code access security (CAS). He explains why to use caspol.exe, instead of the .NET Framework wizards, to set up a security policy during development.

The Importance of Evidence

Author: Peter Torr

Summary: Peter describes why it is important not to throw away evidence of code access security, even if it is not granting permissions.

Adding and Removing Code Access Security Policy via Windows Explorer

Author: Peter Torr

Summary: This article provides a registry file that adds two context menu items on DLLs, .exe files, and folders. One menu item adds the object to CAS policy with Full Trust. The second menu item removes the object from CAS policy.

Troubleshooting Visual Studio Tools for Office Solutions

This category contains blog articles with tips for solving common problems encountered when creating Office solutions using Visual Studio Tools for Office.

Menus, Toolbars, and Forms That Stop Working

Author: Harry Miller

Summary: In this article, Harry explains why menus, toolbars, and forms might stop working in a Visual Studio Tools for Office solution. He includes a code sample that shows how to ensure that these elements continue to work while the solution is loaded.

Do Not Call ReleaseCOMObject

Author: Eric Carter

Summary: Eric provides some advice on when to use and when not to use the ReleaseCOMObject method in Office development. Typically, you should not use ReleaseCOMObject in a Visual Studio Tools for Office solution. Eric explains why.

Making Web Service Calls Work

Author: Peter Torr

Summary: Peter delivers a detailed report on why the default security settings in Visual Studio Tools for Office do not allow Web service calls to work properly. He then describes a workaround to enable Web service calls from your Visual Studio Tools for Office solutions.

Some Exceptions You Cannot Catch

Author: Peter Torr

Summary: This article describes a scenario where exceptions cannot be caught. Then, it shows how to provide an extra layer in your Visual Studio Tools for Office applications so that the exceptions can be caught.

Excel Object Model and Visual Studio Tools for Office

This category contains blog articles about understanding and using the Excel object model.

Change Events of a Named Range

Author: Kathleen McGrath

Summary: Kathleen shows how to handle change events for a named range using the Excel object model. She also includes a link to information about how this changed with Visual Studio Tools for Office, Version 2005.

Using GetSaveAsFileName

Author: Kathleen McGrath

Summary: The GetSaveAsFileName method in the Excel object model provides several optional parameters that change the behavior of the Save As dialog box. In this article, Kathleen shows how to use these parameters and evaluate the response. She also proposes using the SaveFileDialog class in .NET as an alternate option. She also mentions some of the issues encountered with code access security when saving a document to another location.

Working with Office Object Models

Author: Paul Cornell

Summary: Paul points out that developers learning Visual Studio Tools for Office are often frustrated by the Office object model, due to the amount of objects and methods available. He shows how you can wrap the Excel object model in helper functions to simplify development against the object model.

Visual Studio Tools for Office Samples and Walkthroughs

This category contains blog articles about the code examples, sample applications, and systematic walkthroughs referenced in Microsoft documentation or other official Microsoft publications.

Using Visual Studio Tools for Office to Create a Task Pane for Excel

Author: Paul Cornell

Summary: This article describes how to create a simple task pane without having to implement the ISmartDocument interface. Although not a replacement for the task pane or the ISmartDocument interface, it shows a quick way to get similar functionality to a task pane, and demonstrates how to pass data between a document and a Microsoft Windows Form.

Using Visual Studio Tools for Office to Create a Task Pane for Word

Author: Paul Cornell

Summary: Paul follows up on a previous article about how to create a task pane for Excel with an example of accomplishing the same idea with Word.

Visual Studio Tools for Office Training Labs

Author: Harry Miller

Summary: Harry describes the Visual Studio Tools for Office Training Labs available on MSDN. The labs include samples and walkthroughs for both Word and Excel solutions.

Building Microsoft Office Smart Tags

Author: Joe Andreshak

Summary: Joe points out some of the great information available in the Office 2003 Smart Tag SDK, including information on how to use the Visual Studio Tools for Office loader to load smart tags.

Fun with Word Templates

Author: Rohan Cragg

Summary: This article shows how to use one shared assembly from many different Word templates. The example includes information about issues encountered while implementing the solution.

Additional Resources

Visual Studio .NET and Office Development                                                                                                 Microsoft Office Developer Center: Visual Studio Tools for the Microsoft Office System                              Visual Studio Tools for Office 2003 Blog                                                                                                             Visual Studio Tools for Office Newsgroup: microsoft.public.vsnet.vstools.office

For more ...

 

Good resource for outlook programmer

http://www.outlookcode.com/

Suresh Behera

customise printing from ASP or HTML?

Some one ask me how to customise printing from .ASP or HTML or .ASPX page.I got very nice link from aspfaq.com.It says...

Printing happens on the CLIENT. Therefore, you can only control anything to do with printing, from the client... and not from ASP. Changing margins, header & footer, hiding some things on your page from printing, forcing page breaks, and even initiating the printer at all are tasks that can only be accomplished from the CLIENT side. Please keep in mind that you can't (and shouldn't want to) FORCE the user to print your page, or do so without telling them (i.e. allowing them to confirm) that you're about to send data to your printer.
 
This article does a good job of exposing print templates (assuming clients of IE 5.5+): 
   
http://www.webreference.com/js/column89/
 
Mead Co. provides an effective solution which adds the ability to control many of IE's printing features from scripting, such as headers/footers/margins/landscape: 
   
http://www.meadroid.com/scriptx/index.htm
 
HTMLPrinting.com also has a product that allows you to control printer settings: 
   
http://www.htmlprinting.com/
 
Heidi Housten demonstrates a way to invoke the Print dialog: 
   
http://members.tripod.com/~housten/printing.html
 
You can hide things from printing by using a different style sheet setting for screen and print media types: 
   
http://www.w3.org/TR/REC-CSS2/media.html
 
And you can force a page break at certain points in your document: 
   
http://www.w3.org/TR/REC-CSS2/page.html
 
A couple of other useful printing articles can be found here: 
   
http://msdn.microsoft.com/workshop/author/script/dhtmlprint.asp 

   
http://www.htmlgoodies.com/beyond/css_print.html
 

Suresh Behera

More Posts