Tuesday, 14 June 2011

Word Normal.dot template corruption


When automating MS Word, one of the problems that can be encountered is corruption of the normal.dot template. When this happens, the template can be deleted, because it will automatically be recreated with default settings. It would have been nice after all these years, and thousands of features that have been added into Word, if they had a built in feature to do this.

The manually process is not entirely straight-forward, because the normal.dot template can exist in many places.


Here are the basic steps to delete it.
  1. Close all word documents. Run task manager, and check applications and processes to make sure there are no instances of winword.exe running. 
  2. Close Outlook too.
  3. Click on the Start option, click Search, then Files or Folders.
  4. In the Name box, type the name of the global template for your version of Word. For Office 2007/2010 this will be normal.dotx or normal.dotm. For older versions of Office, this will be Normal.dot
  5. In the Look In box, select your local hard drive
  6. Click Search to locate the file.
  7. For each occurrence of global template that appears in the Find dialog box, click the right mouse button on the file and then click Rename. Add a new file name, such as OldNormal.dot or Normal-1.dot.
  8. Retest the application that is creating the Word document.

Wednesday, 8 June 2011

Completed Course on Lynda.com

Today I completed the Introduction to SharePoint 2010 course on Lynda.com.
I found the course to be very helpful, very well presented.
It suffered from none of the hesitant mumbling that in my experience often mark on-line software course, but was fluent, enthusiastic and informative.

I learnt a lot in a a few hours, and I can see that SharePoint is a powerful product with a lot of potential, and should make conventional web designers very nervous.

Am very interested in what a developer can add to SharePoint. It works with Visual Studio and SQL Server, so their are many development options with it. 

Monday, 6 June 2011

Introduction to SharePoint 2010

Introduction to Sharepoint 2010

Sharepoint can be hard to grasp as a concept, because it does not do one thing. Exchange handles emails, calendars, SQL Server is a database server, IIS is an internet server, but we cannot apply such a simple description to Sharepoint.

Sharepoint is not an application, but it is a platform, which is capable of hosting a variety of integrated solutions.

Sharepoint started life as Microsoft SharePoint Portal Server in 2001

These days several products may carry the Sharepoint label.
The server products are
/H
  1. SharePoint 2010 Foundation
  2. Sharepoint Server 2010 - Standard
  3. Sharepoint Server 2010 - Enterprise
Each of these server products includes all the functionality of the version below it.

SharePoint Sites


SharePoint enables the creation of websites.
These are all based on a standard pattern, and all share certain features in common. ALL SharePoint sites are built on collections of lists and libraries.

So even a brandnew  blank websites have certain features as standard, such as "Like" buttons.
One big difference in Sharepoint 2010 from previsous versions, and from WebSites generally is the ribbon. Similar to the Ribbon in office, this allows you to edit SharePoint sites.

The Ribbon is access by clicking on Edit on a SharePoint page.

If you have permissions to edit a site, the Site Actions menu is very important. This will allow you to make modifications to the Sharepoint site.

The elements of Sharepoint are available individually available elsewhere, such as shared calendars and todist list, colaboration on documents - such as Google Documents.

It is the ability to combine them all together, without needing developer experience, which makes it very powerful. Add together SharePoint in the cloud, and it looks a very useful business tool.


Monday, 2 May 2011

Visual Studio 2010 Datasets with SQL Server 2000

It is possible to have a Visual Studio 2010 running aginst SQL Server 2000



I have a client running SQL Server 2000 and I have a UI developed in Visual Studio 2010. When trying to create reports for this I got the message "This server version is not supported.  You must have Microsoft SQL Server 2005 or later".

The client is not going to move to a new version of SQL Server just yet, so I had a problem.

The work around I came up with is to copy the database to SQL 2005 in my development environment, create the dataset and reports against this version at design time, then at run time, switch back to SQL2000. This worked fine.

Another problem I had to overcome was using temp tables when working with VS datasets.
The answer is to put this statement right at the beginning of the stored procedure:


 IF 1=0 BEGIN
     SET FMTONLY OFF
 END 

Sunday, 27 March 2011

Text Type Deprecated in SQL Server 2008 and above

How to handle MS SQL Text type data now that it is deprecated


The text type, which was always a special case when creating triggers, stored procedures and the like is depracated from SQL Server 2008.

To update systems, replace the TEXT type with VARCHAR(MAX) or NVARCHAR(MAX)

In vb.net, change the parameter declarations from TEXT, to this
        cmd.Parameters.Add("@Notes", SqlDbType.VarChar, -1).Direction = ParameterDirection.Output

Wednesday, 23 March 2011

New Features In Visual Studio 2010

A partial list of some of new features in Visual Studio 2010 that I think I will find useful


1) Auto-Implemented Properties
For my database derived code I automatically generate all the properties anyone, but other than that declaring properties with their corresponding Get/Set methods is one of the least exciting tasks. Microsoft have made it easier with auto-implemented properties.
Simply declare the property like this:


   Property ClientID as Integer 


Visual Studio will automatically generate a hidden private member, and Get/Set methods

To make them visible if you need to customise them, for example, to add some validation, then type G or S on the line after the property declaration and VS will show the hidden methods.


2) Reference Highlighting
This will be a feature that I will miss when I work in previous editions of Visual Studio. When you click on a keyword, all instances of it are highlighted.
But much more usefully, when clicking on part of a construction such as a If..Then, all parts of that construction are highlighted. I think that this will be most helpful when working with nested statements.


Some features I am not so sure about:

  • Lambda Expressions - these could make code harder to read, and the time savings over regular functions are minimal.

Tuesday, 22 March 2011

Google Cloud Connect

Today Carl Hughes of IT Hound recommended Google Cloud Connect.
This wonderful piece of technology allows me to use Microsoft Word and Excel, but have them synchronised to Google Documents. This gives me the benefit of having access to my documents from any internet enabled application and being able to collaborate on them with others, but still having the powerful editing capabilities of Microsoft's Office Suite.

Its easy to set this up
1)  simply download and install the Cloud Connect tool from here:
http://tools.google.com/dlpage/cloudconnect
2) Open Word or Excel and login to your Google Apps/Docs account
3) You can then choose to synchronize any document you create, and it will appear in your Google Documents account.

However, in testing this, I could only get it to work in one direction, from Word up-to Google Docs. Subsequent edits in Google were lost.