How to check any existing ActiveDocument?

For office developers, you might want to check is there any existing active document is opened before you open a document template. What you can do is, check is there any open by using  (Globals.ThisAddIn.Documents.Count > 0). Then close the activeDocument using ActiveDocument.Close(ref object, ref object, ref object). Here is the snippet code that for…


Missing "Office = Microsoft.Office.Core" reference?

Missing this reference “Office = Microsoft.Office.Core”?Here is how you can add the particular reference:Step 1: Right-click your projectStep 2: Select “Add reference..”Step 3: Click on the “COM” tabStep 4: Scroll down to select “Microsoft Office 12.0 Object Library”.


How to reserve the URLs to host the WCF service

Run into this error when running your WCF service? This is because you have not reserve the url to host your WCF service.Try this solution:1. Open a Command Prompt as Administrator2. Execute this command :netsh http add urlacl url=htpp://+:8080/ user=User where User is your user name


Visual Studio 2008 is RTM!!

Yesterday at TechEd Europe we announced that Visual Studio 2008 and the .NET Framework 3.5 will be released by the end of November.There are some video recordings on the Channel 9: Lap around Visual Studio 2008 & .NET Framework 3.5 What’s new in C# 3.0?  What’s new in Visual Basic 9.0? .NET Framework 3.5 Enhancements…


Read / Write XML in Memory Stream

Use the XmlWriter to write XML to Memory Stream:MemoryStream stream = new MemoryStream();XmlWriter writer = XmlWriter.Create(stream);  or you can use the XmlDocument to save xml document to specific stream:MemoryStream stream = new MemoryStream();XmlDocument xDocument = new XmlDocument();xDocument.Save(stream); Read the xml document from tream:MemoryStream stream = new MemoryStream();XmlDocument xDocument = new XmlDocument();xDocument.Load(stream); Remember to add the following…


Current .NET technology?

What is current .NET technology?If you are using .NET 1.0 or 2.0, are you considering yourself using current .NET technology?The definition for current .NET technology:Use .Net Framework 3.X or Silverllight or ASP.NETwhere .Net Framework 3.X = .NET 2.0 plus any one of the following technologies- Windows Presentation Foundation, WPF- Windows Communication Foundation, WCF- Windows Workflow Foundation, WF- Windows…


Display .tiff image??

You can display the tiff image using Through ImageDraw’s DrawImage method. Tiff image is bitonal image. All drawing in .NET requires a Graphics object, but a Graphics object cannot be created from a bitonal image. Therefore, The .NET framework does not support modifying bitonal (i.e. single bit per pixel) images.   You may…


Migrate Application from .Net 1.1 to .Net 2.0

There are numerous API changes on .net framework 2.0 compare to .net framework 1.1. Therefore, the application that target on .net framework 1.1 might not work properly on .net framework 2.0.You have fix some of the issues that occur in the application in order for the application to work on or use the new…


Installing .net framework 2.0 will ovewrite the version 1.1?

When you install the .NET Framework, two different types of configuration files are installed, machine configuration files and security policy configuration files. In a side-by-side installation environment, you can install multiple versions of the .NET Framework on the same computer. Each installed version has its own set of machine configuration files and security policy configuration…


Mark your way to becoming a .NET Expert TODAY!!

Interested in learning the latest programming language that drives the industry today? Develop the latest games, the coolest applications and much more with Microsoft’s .NET platform!It doesn’t matter if you’ve been tooling around with Java, PHP, COBOL, PASCAL, RPG or Macromedia all this while. If you’ve got the will, we’ve got the means to help…