June 2006 - Posts

Customising SharePoint 2003 MySite templates
22 June 06 12:16 | Simon Phillips | with no comments

I’ve spent all morning trying to set the default look and feel of the MySite sites on SharePoint 2003. Like the other site templates there is a MySite template definition (C:\Program Files\Common Files\Microsoft Shared\web server extensions\60\TEMPLATE\1033\SPSMSITE). However it looks like the files are only copied across to the site on the creation of Portal site or the first time you create a MySite and all users MySites use the same files. Changing the files after this has occurred will have no effect on any new MySites that are created.

Luckily there is an easy way round this. Using FrontPage you can navigate to http://{sharepointsite}/mysite and using FrontPage modify the default.aspx and public.aspx files with the changes that you require.

Making changes to these file will affect all current MySite sites as well as any that are created in the future.

Reference: Syed Aziz ur Rahman - Customizing ONET.XML of MySite (SPSMSITE) template

Filed under:
Save to PDF Features in Office 2007
09 June 06 09:10 | Simon Phillips | with no comments

One of the big features announced for Office 2007 is the ability to save to PDF. Those of you that have been keeping up with the news will know that Adobe is not too happy with this and Microsoft is being forced to remove this feature from the final version.

According to Brain Jones: Open XML Format blog it looks like this is the save to PDF features will be available, but only as a free add-in.

Filed under:
Testing the blogging features of OneNote 2007 Beta
08 June 06 03:28 | Simon Phillips | with no comments

Even though the OneNote UI has a context-menu entry called Blog this and a File/Send To/Blog menu entry this feature does not seem to work.

Looking at Chris Pratley's One Note Blog you have to copy the Blog template from the office template directory to your users profile template directory.

Once this is done then using the blog feature within OneNote will open a Word 2007 blog documents with your OneNote content. From Word you can then just publish the blog entry. I know it's a extra step but this is just a work around at the moment so you don't have to copy and paste form OneNote to Word.

If you're interested in the blogging features in the up and coming Office 2007 then have a look at Joe Friend's Blog

Filed under:
Compacting a dynamic sized Virtual PC 2004 Hard Disk
08 June 06 11:17 | Simon Phillips | with no comments

This is really old news, but I’m going to post things that I get asked all the time, mainly so I don’t have to load my email archive.

One of the new features that came in SP1 of Virtual PC is a Virtual Disk Pre-compactor, which is basically a tool that you must run inside the VM before you compact the virtual hard drives.

 In the Virtual Machine

  • Remove all the unwanted stuff from your Virtual Machine (Make sure that the recycle bin is cleared)
  • Defrag the Hard drive.
  • Like the VM Additions package the Pre-compactor is an ISO image that you mount to access the program. This is located (by default) in C:\Program Files\Microsoft Virtual PC\Virtual Machine Additions\Virtual Disk Precompactor.iso. Run the application. This 'zeros' out the unneeded space.
  • exit your VM

In the VM Console

  • Run the Virtual Disk Wizard
  • Choose Edit existing virtual disk
  • Select the virtual disk file

Select compact.

Filed under:
Using the replace functionally of the Regular Expression object
06 June 06 09:05 | Simon Phillips | with no comments

I had an email last week from mate about using the regular expressions to replace matched occurrences in a string.

Starting with the string "xabcy and then stuff xwefy" they wanting to find any words beginning with x and ending in a y, remove the x and y and capitalise the remains of the word. Resulting in "ABC and then stuff WEF".

I find that if I don’t use regular expressions regularly (sorry) it’s a syntax that I forget easily. One of the best tools that I’ve come across for building expressions is Roy Osherove’s The Regulator. It’s easy to use with just enough intellisence to get me back into the swing of using expression. It is also linked to the RegexLib.com online expression database.

This is the expression that came up with:

"(?:x)(?<stuff>\w*)(?:y)(?:\b)";

I find it’s important to group part of the expression together.

Starting from the beginning of the expression.

(?:x) – Find the letter x the (?: ) tells the regular expression compiler to ignore the x from the matched results.

(?<stuff>\w*) - \w* matches any number of non-whitespace characters; I’ve called this group “stuff”. I will use this later in the example.

(?:y) – Like the group that matches the x this finds the letter y. This group is also ignored.

(?:\b) – This matches a word boundary (space or end of string). Again I am ignoring this from the matched results.

If you run this though The Regulator using the string above you will match abc and wef.

I know that there is a way of using EMCA script to do manipulation, but to be honest it’s not something that I’ve got my head around.

The .Net Regex.Replace object has an overloaded method which you can capture a matched result from the input string and pass it to a function which you then could manipulate the string.

The above example will return

"ABC and stuff WEF and more stuff xcvfyhgf more DFR longer string DFFGHJJ"

I prefer using the group name rather than the index of the matched groups for the same reason as I prefer using named fields when referencing recordset columns as the index number might change if you change the SQL statement or expression.

And this gets around a gottcha. If you just reference the match object, even if you ignore parts of the string it will return the whole of the matched results. i.e. xabcy. The other thing is that the first object in the Match.Groups collection (match.Groups[0]) is also the whole matched result. My stuff group is actually match.Groups[1].

There is no reason why I couldn’t capture the X, Y and word boundary and then deal with removing these using the MatchEvaluator, but I prefer to ignore these as soon as possible.

Filed under:
Test Blog from Word 2007
05 June 06 10:38 | Simon Phillips | 2 comment(s)

There are still a few issues with using Word 2007 to post to a CS Blog e.g. No Categories and I am unsure on how to upload images using this.

But I’ll see if this works :S

Filed under:

This Blog

Applications / Addons

Irish Community

Microsoft Ireland Blogs

My Articles

Syndication