How to start Word with a specific template

  1. Open Word the usual way.
  2. In the template selection view, select the template you want and click Create. For example, Blog Post.
  3. When Word opened your document, click Save As and select Word Template in the Save as type drop-down box.

    Path should change automatically to your Custom Office Templates directory.
    Give your template a name. For example Blog, to keep it simple. At this point, you can close this document.

  4. On your Desktop or wherever you want, right click and select NewShortcut.

  5. In the location field, add full path to winword.exe file; default location for 2016 version is “C:\Program Files\Microsoft Office\root\Office16”. Also, you need to specify the location and name of your template file. Mine is in “D:\_Main Documents\Documents\Custom Office Templates” so my full path will be (including quotes and template name): “C:\Program Files\Microsoft Office\root\Office16\WINWORD.EXE” /t”D:\_Main Documents\Documents\Custom Office Templates\Blog.dotx”

    Make sure there is a space before /t switch and there is no space between the /t switch and template path. Click Next.

  6. Give your new shortcut a name; Blog from Word for example. Click Finish.

  7. Your new shortcut is now ready for use. Double click it and Word will open using your new template without asking anything else.

Optionally, it’s more a nice to have actually, you can personalize your shortcut with a custom icon so that you can quickly differentiate it from other Word files and shortcuts.

  1. Right click your new shortcut and select Properties.
  2. Click Change Icon… and browse to the location where you have an .ico (ICO file format is an image file format for Windows icons) file you want to use.

    If you do not have an icon to use, click Browse and in File name box type: %SystemRoot%\System32\SHELL32.dll
    Here you have quite a few old but good icons that you can choose from. Select one icon and click OK twice.

  3. Your shortcut is now fully customized and ready for use.

How to use Word for Blog publishing

  1. Start your Office Word application. It works with any version starting with Word 2007.
  2. While you’re in the new template selection view, search for “blog” in the “Search for online templates” field.

  1. Blog post” template should be listed. Click it and then select Create button.

  2. On first run only, you’ll be asked to register your blog in Word. You can click Register Now and walk through this process or you can click Register Later and do it later by using Manage Accounts from Blog command group.

  3. If you clicked Register Now, you’ll be asked to select your blog provider. You see that this list does not include all possible blogging platforms, that’s kind of normal I’d say…, but you have the Other option and you then can add any blog details as long as you know the link to provider’s API.

    I selected WordPress because this is what I have.

  4. Next screen will ask for your blog’s URL. And, this is different from platform to platform but, for WordPress you need to provide the link to your xmlrpc.php file. It is usually in your root folder of your site but if it is in another folder, make sure to add the correct path.

    For default location, just paste your site’s address between the backslashes, thus replacing <Enter your blog URL here> with your blog’s URL.

    Add your username and password. Optionally, select Remember Password if you’re the only one who’s using your Windows account. If there are more people using same Windows account, to prevent others posting funny things to your blog, leave this option unchecked.

    Under Picture Options, you can select where your post’s pictures will be uploaded to. For simplicity, keep it as My blog provider.

  5. Once you have all fields completed, hit OK.

  6. If everything was done correctly and Word could connect to your blog, you’ll be presented with a nice confirmation message.
  7. Next, you’ll have your Word template changed to Blog. Notice Blog command group. It contains all your basic needs for creating and publishing blog posts. One thing is missing though, ability to add Tags.

    If you have a more complex blog, photography maybe or e-commerce, or if you use Featured Images or you need to add Location to your posts, probably Word is not that much suitable to you.

  8. From Insert tab, you have access to add a lot of items to your post, like images, shapes, tables etc.. As an example, below picture has Rounded Corners style added.

Below is a shape added from Word, it will be posted as a picture:


Just in case something went wrong and you have issues connecting to your blog or uploading images, please take a look at Microsoft’s article about this, scroll down to the bottom for troubleshoot problems.

Creating an e-book. Part 2.

Following on from previous post about creating an e-book, today we will make that “black on white” text look nicer and we will do it using CSS (Cascading Style Sheets).

I will not detail on what CSS is because this is not the purpose of this post. If you need to refresh your knowledge, please head over to W3School’s page.

Very shortly though, CSS helps HTML look nicer and it does so by defining how each HTML element should be displayed in a browser.

By now, we know that an e-book is basically HTML. Plain HTML documents can be read by most browsers in the same way, which is not the case about e-books. Because e-books can be read on e-readers, computers, tablets, phones etc., screen sizes will differ, same will font size, page width etc. With this in mind, we need to ensure that we use relative sizes and not sizes in pixel (PX); so we’ll use either percentage (%) or em (EM).

    Quoting W3Schools: What is the difference between PX, EM and Percent?

Pixel is a static measurement, while percent and EM are relative measurements. The size of an EM or percent depends on its parent. If the text size of body is 16 pixels, then 150% or 1.5 EM will be 24 pixels (1.5 * 16). Look at CSS Units for more measurement units.

Again, very shortly, 1em equals to current device’s font size, 100%. 1.5em will be 150% of current font size. 2em will be 200%…, you got the idea.

Although we can add CSS properties and selectors inside .html file, we will create a separate .css file and will link it from .html file. This way, you can very easily use same CSS file as template for other books, instead of copy/pasting specific text from inside .html file.

OK, let’s open a blank notepad file and save it as epub.css in the same folder where mybook.html. Let’s add one additional line to our .html file so that it knows where to look for this .css file.

Right click mybook.html file and open it with notepad. Add one new line after <meta> and before <title> tags and add: <link rel=”stylesheet” href=”epub.css” />

<meta content="text/html; charset=utf-8" http-equiv="Content-Type" />
<link rel="stylesheet" href="epub.css" />
<title>My Book's Title</title>

As mentioned previously, out of all HTML tags, we will use Headings and Paragraphs the most in any e-book, throughout the entire book. Let’s then start with defining Headings because we need them for Chapter titles and subtitles. Again, using CSS we can design our HTML to look awesome and each of you will have your own definition of awesome and, why not, design skills, which I surely lack.

Let’s say in our e-book we want Chapter Title to be 1) aligned to the right and 2) have an additional 2 free lines from the previous block of text. To accomplish all this, in our epub.css file we will write below code for h2:

h2 {

Save .css file and leave it open. Now open mybook.html in a browser. See how our Chapter Title changed from left to right and the space before and after it? Just to show you how easy it is to change something using CSS, let’s say we want Chapter Title to be in red… in epub.css add color:red; text on the next line after margin-top:2em;. Save the file and then refresh html file in your browser. Your title should now be in red.

Now think about it a little. What if you would have a book with hundreds of pages, with hundreds of Chapter Titles? With one line added the CSS file, you changed the look of all Chapter Titles. How cool is that?! Let your imagination flow and modify your CSS file as you wish to make your e-book look great!

Ok, before going on, let’s remove the line with red color, unless you want to leave it of course.

Regarding Chapter Subtitles, let’s say we want them also 1) right-aligned but 2) style should be italic. Below is the code to make this happen:

h3 {

Regarding paragraphs, as you recall, I added 3 paragraphs in my .html file; I did this because I wanted to show you 3 different examples of paragraphs modified through CSS styles. So, let’s make all default paragraphs justified, first line indented by 2em, without any margins on left or right (because we want to use as much space as possible) but we do want to have a little bit of size before next paragraph starts. Here’s how we can accomplish this:

p {

Next, we will also use a paragraph but with a purpose. For example, when we will want to quote something or add few lines of text that is totally different from other paragraphs etc. We’ll make it center aligned, italic and will add some space before and after so that it is visible and distinguished.

p.quote {

In the above code you will notice a small addition to our CSS style. By adding p.quote, we’re just specifying that any paragraph with quote
class, should have these additional changes applied (for example, if we will not add text-align:center;, this paragraph will remain justified because this is what text-align for all paragraphs says).

If you’re more curious… similarly, if you will add only .quote for example, that means any HTML tag where you will add quote class will have those changes applied.

Seems easy and straightforward to me. Again, think about how easy you can modify an entire book?! You can take same .html file and only make changes in the CSS file to get a completely different book. Think about how easy you can create books for readers with low vision, blindness or visual impairments! Try and play with the menu from W3Schools and you’ll be amazed of what you can do with CSS.

For last paragraph mainly I want to make you interested in “what else can I do easily?”. Let’s modify only first paragraph in any chapter so that it has a visual delimiter from Chapter Subtitle.

p.first {

At this point, I have defined my 3 paragraphs like this: First is first obviously; Second is a quotation-like and Third is just a normal paragraph. Here is my html code inside <body> tags (I’ve cut the text in code to make it shorter but it is visible in the screenshot in its full width):

<h2>Lorem Ipsum</h2>
<h3>What is Lorem Ipsum?</h3>
<p class="first">Lorem ipsum dolor sit amet, consectetur adipiscing elit.</p>
<p class="quote">Nullam tortor orci, dictum id vulputate ut, sagittis vel arcu.</p>
<p>Curabitur ligula tortor, ullamcorper placerat commodo eu, efficitur ut dui.</p>

Here’s my webpage in IE:

Creating an e-book. Part 1.

As explained in Ok, E-Books post, this topic became of an interest just recently. I have never created an e-book so you will not see me saying that I’m usually doing it this way or that way or other crap like this. No, cards on the table. I’m just as curious as you are about e-books; I read quite a few online articles and even bought an e-book about how to create an e-book…

Following that book I was able to turn one of my procedure document from work into a fully working e-book. I uploaded it to Amazon’s Kindle Direct Publishing and it din’t complain at all. At KDP I reached the step where I could download a sample book file to see how it will look like. So, it works. fine In these series of posts, I’m just trying to put down the steps needed to create a simple e-book in .epub format. You’ll be free to further enhance it as much as your design and HTML skills are.

Just so this is clear from the beginning, an e-book is just a transformed XHTML, CSS and XML files. Because few people may not know what XHTML is, I quickly wrote HTML vs XHTML post yesterday. Regarding XML, I will show you later what it is for and how to create it.

Before we start, I’d like to tell those few basic HTML tags that we will use. I want you to understand  them, not just using them blindly.

  • Headings are defined with the <h1> to <h6> tags, with <h1> being the biggest heading and <h6> the smallest. Headings are really-really important because they will define your book’s Table of Contents. We will not use <h1> for Book Title mainly because we don’t need Book Title in the Table of Contents; we will use <h2> for Chapter Titles and <h3> for Chapter Subtitles.
  • A paragraph is defined using <p> tag only. We’ll see later how we can have differently formatted paragraphs using CSS.
  • We will also use <div> tag for other HTML elements, specifically when we will want to define specific blocks or divisions of text.
  • We will also use CSS a lot to format different blocks of text and images.

With that said, let’s get started.

  1. First and foremost, you need to write something. An article, a novel, something. Or take any document that you can test with. Format doesn’t matter now, it can be a text file, word file, anything.
  2. Again, we’ll use XHTML Strict so our html file will be well formatted. Initial code is nothing fancy, just basic html code. Copy below code to a notepad file and save it as mybook.html in a new folder [leave notepad file open]. Below is what I have so far in my file. Note that I added “My Book’s Title” as a page title, see line 7.

    <?xml version="1.0" encoding="utf-8"?>
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "">
    <html xmlns="" lang="en" xml:lang="en">
    <meta content="text/html; charset=utf-8" http-equiv="Content-Type" />
    <title>My Book's Title</title>
  3. Suppose you have your manuscript by hand. To start with, copy the contents of one chapter only and paste it exactly inside the <body> tag. Save the file.

    Paste your first Chapter here.
  4. Go to the folder where you have mybook.html file and double click it so that it opens in your default browser.
  5. For testing purposes, I used website to generate 3 paragraphs of dummy text. I placed this text inside the <body> tag and saved the file. If I run mybook.html now, my browser will show nothing except clear text; no breaks, no new lines, nothing.
    This is because we need to tell our browser where to start a new line, a new paragraph, where to put a heading and so on. This is done using tags described in the beginning.
  6. Next, we’ll add your chapter’s title and paragraphs. Going back to your notepad file, right where your chapter title begins, add <h2> tag. Where your chapter title ends, add </h2>. Backslash key is to tell the browser that here we are closing the previously opened tag, <h2> in our case.
    Now, if you have chapter subtitles, do something similar. Right before your chapter subtitle starts, add <h3> tag. Where your chapter subtitle ends, add </h3>.
    Similarly, where your paragraph starts, add <p> tag. Where your paragraph ends, close the tag with </p>. Do the same for all other paragraphs you have. Save the file and run it again in your browser. Looks nicer, isn’t it? Here’s what I have:As you can see, there seems to be a default space between chapter title, subtitle and the paragraphs. Also, everything is left centered and there are no other formatted elements. This is what we will work on in the next post.

Uninstall software on remote computers using WMIC

Recently, I wanted to install Nokia Ovi Suite to several computers in a company that started to have problems with their internet provider; it’s a third day when they do not have internet connection. So I thought it’s a good idea to show them how they can use their Nokia E72 phones to connect their laptops to internet.

Well, prior to installing Nokia Ovi Suite I had to uninstall old versions of Nokia PC Suite from 4 systems, remotely. I decided to do it using WMIC instead of ConfigMgr as the Nokia PC Suite was installed on small number of computers. After this, I can proceed with installing Ovi Suite using ConfigMgr. Till then, here is how I uninstalled PC Suite using WMIC.

  1. In a command prompt window, type Runas /user:YourUsername@UPNsuffix cmd.exe (or Runas /user:domain\username cmd.exe) where YourUsername is your domain admin username or any username with admin privileges on the remote computer and UPNsuffix is your UPN suffix. Let’s suppose I use
  2. In the command prompt window type the password for user and press Enter
  3. Type WMIC
  4. Now, list all Nokia software on a specific computer using the command /node:COMPUTERNAME product where vendor=”Nokia” get name, version
  5. Once we know the software name, we can uninstall specific product using the following command /node:COMPUTERNAME product where name=”Nokia PC Suite” call uninstall. You will see a message like Execute (\\COMPUTERNAME\ROOT\CIMV2:Win32_Product.IdentifyingNumber=”{225DB4AA-3CFF-47E8-B3C8-6DAD713E986E}”,Name=”Nokia PC Suite”,Version=”″)->Uninstall() (Y/N/?)?
    Type Y and wait for the result.
  6. To make sure Ovi Suite will install successful, I’m going to uninstall all Nokia software (except the runtime) using the same command just replacing the software name.
  7. Now, I can proceed and install Nokia Ovi Suite using ConfigMgr Software Distribution method. By the way, program’s command line for silent install is Nokia_Ovi_Suite_webinstaller_ALL.exe /SILENT=”1″

If vendor name contains spaces, use the following example: wmic product where vendor=”Microsoft Corporation” get name

Find computer name for a remote computer using PSExec

Let’s say you know the IP address of a computer but you don’t know the hostname. Seems to be an easy task with ping –a, if you have a working DNS Smile

If not, you can try the following approach:

  1. Create a cmd file on client’s computer. Say in \\IP\C$\Windows\Temp\FindHostname.cmd
  2. Edit FindHostname.cmd. Type in: echo %computername% >> C:\Windows\Temp\Hostname.log
  3. Run PSExec: C:\PSTools\PsExec.exe \\IP C:\Windows\Temp\FindHostname.cmd
  4. Look into \\IP\C$\Windows\Temp\Hostname.log, you will have the computer’s name.

Deploy Office 2007 SP2 with ConfigMgr 2007

As Microsoft recently released Service Pack 2 for Office 2007 suite, it is a good idea to add the update files to the package so it can be installed during the installation.

So, first of all we have to download the SP2 executable file from here: (see Visio and Project information at the end of this post).

Then, using a command prompt window, extract the content of the package to a folder you can browse to.

Accept EULA and click Continue.

Select a folder to extract the files to.

When the extraction is complete, you should have the following files:

At this point, you can delete the office2007sp2-kb953195-fullfile-en-us.exe file. Copy the other 9 files to “Updates” folder from your Office 2007 source folder.

Now you only have to update the distribution point/s and the next time Office 2007 will install, it will apply the SP2 update during Office 2007 installation.

Additional info:

The same steps are valid for Visio and Project 2007.

Microsoft Office Visio 2007 Service Pack 2 (SP2) can be downloaded from here:
Microsoft Office Project 2007 Service Pack 2 (SP2) can be downloaded from here:

Find computer model and manufacturer using remote WMI

In case you need to find the computer model and manufacturer of a remote computer, just use the following command in a command prompt window:

%windir%\System32\wbem\WMIC.exe /node:"ComputerNameORIpAddress" ComputerSystem Get Model, Manufacturer

If you need to specify user credentials, use the following command:

%windir%\System32\wbem\WMIC.exe /node:"ComputerNameORIpAddress" /user:"domain\username" /password:"password" ComputerSystem Get Model, Manufacturer

Deploy Office 2007 with custom Quick Access Toolbar commands

Receiving some complaints that users can’t find the Open, New etc. commands in the new Office 2007 interface, I had a task to customize Quick Access Toolbar so that all users can have these commands installed by default.

Office 2007 applications (Access, Excel, PowerPoint, Outlook, Word) use a Quick Access Toolbar setting file (.qat). Every application has its own .qat file (Access.qat, Excel,qat, Outlook.qat, PowerPoint.qat and Word.qat). In order to customize and deploy these files using Office Customization Tool, we must add a registry entry to enable roaming user profiles to access the .qat file during deployment. This is because, by default, qat files are not saved in a roaming location.

I did this using the OCT:

  1. Open or create a new setup customization file (.msp) for Microsoft Office 2007.
  2. Under Additional content, select Add registry entries and click Add.
  3. Select HKEY_CURRENT_USER in the “Root” select box.
  4. Select REG_DWORD in the “Data type” select box.
  5. Enter Software\Microsoft\Office\12.0\Common\Toolbars in the “Key” input box.
  6. Enter QuickAccessToolbarRoaming as a “Value name”.
  7. Enter 1 as a “Value data”.
    Add/Modify Registry Entry
  8. Click OK.

After this, the default folder for .qat files will be: %APPDATA%\Microsoft\Office.

Now log in to any computer that has this modification and customize the Quick Access Toolbar for every Office 2007 application as you want. When you’re done, navigate to “%appdata%\Microsoft\Office” folder and copy all .qat files from there to a USB media for example.

QAT files

Now you have two methods of distributing these files: copy these files to all computers manually/using a script or use OCT. It depends on your needs… I will use OCT to have these files copied during the installation of Office 2007.

To do this, open the same office customization file (.msp) as earlier and do the following modifications:

  1. Under Additional content, select Add files and click Add.
  2. In the Add Files to MSP File dialog box, open the folder that contains your *.qat files, select the Excel.qat file (for example) and then click Add.
  3. In the File Destination Path dialog box, select the path [AppDataFolder]\Microsoft\Office for the “Destination path on the user’s computer”.
    File Destination Path
  4. Click OK.

Next time when you will install Office 2007, Quick Access Toolbar in every application will have the commands you set. In my case, Excel’s Quick Access Toolbar looks like this:

Quick Access Toolbar commands