Monday, March 18, 2013

WordPress and Word

Microsoft Word has a feature to use Word to compose and publish a blog entry. I have used this periodically and have had mixed feelings about it. Now that I am hosting my own blog using WordPress I wanted to test this feature out again. How does it work with formatting different things and how well does the overall look and feel match the rest of the blog?

Here is some code…







static bool RenameFile(FileInfo fi, string newFullFilename)
{
   try
   {
        fi.MoveTo(newFullFilename);
        Console.WriteLine("New={0}", newFullFilename);
   }
   catch (Exception ex)
   {
       Console.WriteLine("Error {0} renaming {1}", ex.Message, newFullFilename);
        return false;
}
   return true;
}


 

Here is a picture…



I notice that it does not do multi column or other more advanced formatting normally available in Word. Maybe I will give this a shot since it does give you the robust spelling/grammar checking of Word.

PS.  I had to go into this post from the WordPress editor and clean up the code section.  The different way of single spacing something using <p> vs <br> is the issue.  Every line of code is a <p> when in fact I want it to end with <br>.  Oh well.  Not as good as I hoped.

I took the code above and plugged it into the code formatter I previously blogged about here.  It looks like the following, which in preview mode looks pretty good.
 static bool RenameFile(FileInfo fi, string newFullFilename)  
{
try
{
fi.MoveTo(newFullFilename);
Console.WriteLine(“New={0}”, newFullFilename);
}
catch (Exception ex)
{
Console.WriteLine(“Error {0} renaming {1}”, ex.Message, newFullFilename);
return false;
}
return true;
}

 

No comments:

Post a Comment