microsoft-word interview questions

Top microsoft-word frequently asked interview questions

Word heading number blacked out

When opening the document I am working on in Word 2010 this morning, the number in heading level 1 is a black rectangle:

enter image description here

however, it still look ok in the bookmark pane:

enter image description here

Weird, ey?

Source: (StackOverflow)

What type of file is ~$file?

When I had opened msoffice file that I had previously saved on my desktop, I saw another kind of file named ~$doc. What type of file is this ?

screenshot with both files - the original and the ghostly twin

I have marked both the files.

Source: (StackOverflow)

Stop MS Word from selecting more than I want

I would like to just select (¬Q) without word selecting both brackets.

I know if I move my cursor back to the same position word will select correctly, but it's annoying to have to do that every time.

Is there any setting to disable this?

Source: (StackOverflow)

How do I update all fields in a Word document?

I want a way of updating all fields in a Word 2013 document. (If it works in other versions, all the better; I originally had this problem with Word 2007, and nothing seems to have changed since then.) This includes cross-references, page numbers, tables of contents, indexes, headers, etc. If it can be updated by pressing F9, I want it updated.

(In theory updating fields can cause other fields to need updating, e.g. a longer table of contents changes some page numbers in the main text. Taking care of the common cases is good enough for me. In fact, it's ok if I have to run the macro two or three times before it stabilizes. I just want to have a single macro that finds everything.)

My attempt so far doesn't update fields in text boxes inside figures. How do I update them, and what else have I missed?

EDIT: Combining the answer given with what I already had gives a macro that seems to update everything (with a known defect).

'' Update all the fields, indexes, etc. in the specified document.
Sub UpdateAllFieldsIn(doc As Document)
    '' Update tables. We do this first so that they contain all necessary
    '' entries and so extend to their final number of pages.
    Dim toc As TableOfContents
    For Each toc In doc.TablesOfContents
    Next toc
    Dim tof As TableOfFigures
    For Each tof In doc.TablesOfFigures
    Next tof
    '' Update fields everywhere. This includes updates of page numbers in
    '' tables (but would not add or remove entries). This also takes care of
    '' all index updates.
    Dim sr As range
    For Each sr In doc.StoryRanges
        While Not (sr.NextStoryRange Is Nothing)
            Set sr = sr.NextStoryRange
            '' FIXME: for footnotes, endnotes and comments, I get a pop-up
            '' "Word cannot undo this action. Do you want to continue?"
    Next sr
End Sub
'' Update all the fields, indexes, etc. in the active document.
'' This is a parameterless subroutine so that it can be used interactively.
Sub UpdateAllFields()
    UpdateAllFieldsIn ActiveDocument
End Sub

Source: (StackOverflow)

Change spelling check language for a Document in Microsoft Word 2010

Usually I use Microsoft Word 2010 to write English documents

Now I'm editing a document of another language, and want to change the spelling check language of this document

This change should not affect other documents (means does not saved by default) so I can work with English documents in the future

Any clue? Thanks in advance.

Source: (StackOverflow)

Apply template to an existing Word document file

I have a bunch of really old system manuals that need to be updated, but I can't for the life of me imagine opening each one up and applying the styles, ensuring font remains same, size color, etc.

I have a template saved (header and footer with logo, etc) and want to apply the standard header and footer across multiple documents.


Source: (StackOverflow)

How to change the background color of a single page in Word 2010?

I can easily change the page color of every pages in my document thanks to the Page Layout Tab in the Ribbon, but I would like to change the color of a single page.

Any idea about how to to this with Word 2010 ?

Source: (StackOverflow)

Breaking the Outlook 2010 e-mail blue quote line for inline responses

I've finally figured out a way to comprehensively fix this problem, though it took a lot of work and the creation of an Outlook 2010 addin! See below for the addin download. As far as I'm aware, though, there is no way to deal with this problem unless you install an addin to do it, because this is essentially caused by a bug in Microsoft Word's conversion of documents to HTML (which needs to happen before you send an Outlook HTML e-mail).

See down below for the original description of the problem (Outlook 2007, 2010, etc. not allowing proper inline responses because you can't break the blue "quote line" on the left).

My addin basically intercepts the e-mail before it is sent, grabs the Word document (if the e-mail format is to be HTML), and fixes the Word document's XML, before saving it as HTML and setting the e-mail's HTML body to the 'fixed' HTML. Then, finally, inline responding works. :-) It can be done by going to where you want to break the blue line, pressing Ctrl+Q, and entering the inline response. Without my addin installed, the blue quoteline will be reinstated in front of the inline response when you send the e-mail.

Here's a screenshot to show what inline responses look like in Outlook 2010 once the fix is applied (yeah, it's messy because I was comprehensively testing it; all the stuff here is exactly what the (top of the) e-mail looked like before I hit 'Send'):

enter image description here

I have uploaded the source code of the addin that I had got round to developing when I originally posted this answer; I haven't had the time (or a copy of Outlook 2010 for that matter) to develop it further, so here's the disclaimer: this will probably not work at first because I can't remember where I was in developing it, but I know I got it to a proof of concept. I'm releasing this code under the GPLv3 so if someone with some development experience wants to try and get it working nicely with Outlook 2010, please do so and contribute your solution back (licensed under GPLv3) linked in a comment on this answer. However, I probably won't personally ever get round to making this a "finished" solution. The code is just to show you roughly how I did it. The addin is implemented in a Visual Studio 2010 solution, so you'll probably want to use that. Here's the download:

Jens Frederich contacted me to say that he has started working on making the addin usable. The Github project is here:

This has to be the most infuriating regression from Outlook 2003 to 2007. It also exists the same in Outlook 2010, as far as I can tell.

When you reply to an HTML e-mail message in Outlook, the quoted text has a blue line down the side, and is usually at the bottom of the message:

alt text

Now in Outlook 2003, when replying to HTML-formatted messages in Outlook, you used to be able to reply inline quite easily, by getting to the point in the quoted message you wanted to reply to, and pressing the 'decrease indent' button:

alt text

Since Outlook 2007 (and 2010), they replaced the e-mail editor with Microsoft Word. This means the blue line is implemented in a different way; it uses a blue left border. This makes it tougher to break the line up. After much ado, I found a couple of pages that said that you could remove all formatting by pressing Ctrl+Q, which would remove the blue line next to the cursor and allow inline replies:

alt text

OK, not too bad on the face of it. I can live with that. But here's the kick in the teeth; try sending that mail. I'll send it to myself. What do I receive? This:

alt text

Outlook 2010 reinstated the blue line, where I had removed it, upon my sending the e-mail! For God's sake! The two pages I linked to above don't seem to address Outlook's reinstating of the blue line upon sending.

So, does anyone know how you can actually reply inline in Outlook 2010 (or Outlook 2007) e-mail without the blue line being reinstated? Before anyone says, I do not want to convert the message to plaintext, and I do not want to just indent replies and have to manually build the blue line myself. I want something like the Outlook 2003 behaviour; I reply, Outlook creates the blue line, and I can break it up with inline replies, send it, and my inline formatting stays.

Source: (StackOverflow)

Word: Disable spell checker for a paragraph?

Is it possible to disable the automatic spell checker in MS Word 2010 for single paragraphs of a document or just for some parts of a document?

I'd like to get rid of the squiggly lines in some parts of a document (e.g. containing extracts of an XML document), because they make reading the document hard.

Source: (StackOverflow)

How should I convert Markdown (or similar) to a Word Document?

Here's the deal:
In school I want to write my actual content in Markdown (using [Q10] or Notepad++) in school so that I can actually focus on writing without the ugliness of Word 2000 on my screen, but I have the problem of actually converting the Markdown into the final Word document so that I can set the line spacing, margins, cover page, etc.

How can I accomplish this?

I should also mention that I'm running said programs (except Word) off of my flash drive as PortableApps, the school computers run DeepFreeze, and I do have commandline access.

Source: (StackOverflow)

Why are PDFs generated from MS Word so large?

I created a simple MS Word document containing just this sentence:

This is a small document.

Nothing else. Then I've saved this document as DOCX and a PDF. Here are the file sizes:

DOCX: 12 kB
PDF: 89 kB

This difference is huge, technically, and it really starts bothering me when mostly textual documents that are tens of kB in DOCX start generating PDFs that are hundreds of kB large. What's so inefficient about the PDF format? Or is just Word using some terrible output algorithm?

BTW, the PDF output settings were set to create the smallest file possible:

PDF output options

Source: (StackOverflow)

Inserting SVG files in a Microsoft Word document

How can I convert or insert an Inkscape SVG file to a Microsoft Word document?

Note: It has to be editable. The resulting exported PDF has selectable text.

Source: (StackOverflow)

How to keep selected text highlighted when focus changes in Microsoft Word/Excel

Related to this question: Show cell selection in Excel when not in focus except that my case concerns Microsoft Word.

When I select text or a column/row in Microsoft Word or Excel (2003, 2007, 2010 or 2013) it shows up highlighted like this in Word:

enter image description here

and Excel:

enter image description here

However, when I change focus to another program, the highlighted text is no longer highlighted.

I generally work with 2 monitors, where one monitor contains a document/spreadsheet containing data I need to read, and the other monitor is where I am actually doing work. I will select some text (or cells) to make it stand out amongst the many pages of data, and then switch programs, but the highlighted text is no longer visible.

Is there a permanent solution to this problem?

Source: (StackOverflow)

How do I add formatted code to a Microsoft Word document?

I need to write a document in MS-Word 2007 that contains a lot of examples of VB.NET and C# code.

What is the best way of getting the code to look reasonable in the document?

What styles etc do people use?

(I do not have time to hand edit/format the code, and would be very happy if it just looked the same as it does in developer studio)

In other works what do people do that are writing programming books, there must be a good automated solution for this...

I would like a way to use word styles sheets to control what the code looks like, but don't wish to have to "select" every keyword etc to set it's style.

see also http://stackoverflow.com/questions/387453/how-do-you-display-code-snippets-in-ms-word-preserving-format-and-syntax-highlig/2653406#2653406

Source: (StackOverflow)

How do I set up continuous paging in Word across different sections?


In a document I'm preparing, I have the following sections:

  • Cover page, table of contents, introduction, etc. -- portrait orientation
  • The second section, some challenges -- landscape orientation due to space limitations
  • Third section, some recommendations -- portrait orientation again.

I use section breaks to accomplish the different page orientations.


While the section breaks work well for orientation, it looks like they throw off MS Word's Table of Contents, which starts over at page 0 for each section:

Table of contents, starting at zero for each section


How can I get MS Word Table of Contents to ignore section breaks for the purposes of page numbering, so that I can have continuous numbering of my pages?

Source: (StackOverflow)