Blogging with Word 2007

I’m using Word 2007 to create this post. I was actually starting to create a new document and I figured I would try creating a new blog post to see how it works.

I was first presented with this dialog to register my blog:

 

I selected Wordpress from the list and saw this dialog:

 

I put in my blog (http://nathandewitt.net/blog/xmlrpc.php) and entered my account information. I clicked OK and presto changeo I was done.

Next I entered my title:

 

Then I clicked on the Insert Category. It reconnected to my blog to download my Categories, and then I selected Meta from the dropdown list.

I’m going to play around with some of the Word 2007 features to see how it handles them:

An Equation:

Word Art:

 

Some Code:

 


				private
				SPListItemCollection nominated(SPList calendarList)

        {


				SPQuery query = new
				SPQuery();

            query.ViewAttributes = "Scope=\"Recursive\"";

            query.Query = "<Where>" +


				"<Eq>" +


				"<FieldRef Name=\"" + nominateField + "\" />" +


				"<Value Type=\"bit\">1</Value>" +


				"</Eq>" +


				"</Where>";


				return calendarList.GetItems(query);

        }

 

Finally, I typed everything up and clicked Publish. It seems pretty straight-forward.

Pros:

  • Simple to get up and running
  • Handles styles decently
  • Images get uploaded and stored without hassle
  • It’s nice to work in the familiar environment of Word
  • Making changes just involves publishing again

Cons:

  • Equations don’t get converted to PNG or anything, they just vanish
  • Difficult to predict formatting, had to put each picture’s text wrapping properties to Top & Bottom
  • Word Art images have white background
  • The code gets messed up – coloring is fine but each line is a separate paragraph

Conclusion:

This was easy to get going, but I’m not pleased with the embedding of other items (pictures, equations, code). This is a great solution for just writing a typical blog entry without a lot of pictures or style changes. Maybe I’ll use this more for blogging longer essays. I think I’ll stick with handcoding the HTML for now.

Testing Syntax Highlighter

I’m using syntaxhighlighter plugin to manage my source code listings. Just activated it, and now I’m testing it out.

Here’s some SQL:


SELECT i.first_nm, i.last_nm, iui.username, s.descr
FROM tbl_individual i
JOIN tbl_ind_userid iui ON i.pn_id = iui.pn_id
JOIN tblkp_ind_status s ON i.status_cd = s.status_cd

Here’s some XML:


<system.web>
<securityPolicy>
<trustLevel name="WSS_Medium" policyFile="C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\12\config\wss_mediumtrust.config" />
<trustLevel name="WSS_Minimal" policyFile="C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\12\config\wss_minimaltrust.config" />
</securityPolicy>
<httpHandlers>
<remove verb="GET,HEAD,POST" path="*" />
<add verb="GET,HEAD,POST" path="*" type="Microsoft.SharePoint.ApplicationRuntime.SPHttpHandler, Microsoft.SharePoint, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" />
<add verb="OPTIONS,PROPFIND,PUT,LOCK,UNLOCK,MOVE,COPY,GETLIB,PROPPATCH,MKCOL,DELETE,(GETSOURCE),(HEADSOURCE),(POSTSOURCE)" path="*" type="Microsoft.SharePoint.ApplicationRuntime.SPHttpHandler, Microsoft.SharePoint, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" />
<add verb="*" path="Reserved.ReportViewerWebControl.axd" type="Microsoft.Reporting.WebForms.HttpHandler, Microsoft.ReportViewer.WebForms, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<add verb="*" path="*/rss.xml" type="CKS.EBE.RssHandler, CKS.EBE, Version=0.1.0.0, Culture=neutral, PublicKeyToken=3e8b700c069fb747" />
</httpHandlers>
</system.web>

And here’s some C#:


private string GetRandomPasswordUsingGUID(Int32 length)
{
string result = System.Guid.NewGuid().ToString();
result.Replace("-", String.Empty);
if ((length < 1) || (result.Length < length))
{
throw new Exception("Length must be between 1 and " + result.Length.ToString());
}
return result.Substring(0, length);
}

Intro

Hi.  My name is Nathan DeWitt, and I’m a software developer.  I’m just getting started with this site, and I think I’m going to keep it the default WordPress look for a while until I figure out the direction (design-wise) I want to go with.

I plan on using this space to write about some professional topics, which for me involve ASP.NET, MOSS/WSS, MS SQL Server and some of the other Microsoft development stack.  There will also be some other stuff mixed in as I explore new areas.  Pretty much stuff I come across that seems interesting should find its way here.  If nothing else, this will be a place to remind myself what section of that web.config should be edited, or how to extend a system partition in WinXP.

I look forward to receiving any comments or emails.