Welcome to MSDN Blogs Sign in | Join | Help

Necessity is the Mother of Discovery

In The Republic, Plato said "…the true creator is necessity, who is the mother of our invention." Over the years, this phrase morphed into the idiom "necessity is the mother of invention." I've found that when working with a product as rich as Word, this wisdom turns into "necessity is the mother of discovery."

For example, one of the projects we worked on during 2007 was writing the Word 2007 version of Rich Text Format (RTF) specification. I mention this because it was during this project that we needed and therefore discovered three little-known but very handy table features in Word:

  • Repeating Headers
  • Sorting
  • Table Properties

<aside>I'm not being cute when I say we "discovered" these. Not every member of the Word team is an expert in each of the 1,700 or so commands in Word 2007. Put it this way: We have table experts on the Word team, but not everyone on the Word team is a table expert.</aside>

If you have ever had the pleasure of reading the Word 2007 RTF spec cover-to-cover, you know that Appendix B contains a forty-plus page table. It's a massive three column table describing everything you can do with RTF (column 1), listing where each of those things are covered in the spec (column 2), and slotting each of those things into a "type" category (column 3).

 

As you might guess, our work on the spec culminated in adding all the new Word 2007 stuff to this table and reporting how much stuff you could now do with RTF.

Adding pages of new rows to a very specifically formatted alphabetized forty-plus page table necessitated either discovery or insanity. Fortunately we discovered repeating headers, sorting, and table properties.

Repeating Headers

This one is easy and made pages two through forty-four of the table easier to work with. Specifically, when we repeated headers, we could see the header row of the table at the top of every page the table spanned.

For example, here are pages two and three of the table with headers repeating and then the same pages without headers repeating:

Header Rows Repeating

Header Rows Not Repeating

As you can see, the header row is at the top of every page the table spans when you repeat header rows. Conversely, the header row is not shown when you don't repeat header rows. We liked the clarity added by repeating header rows and selected it like this:

Sorting

While repeating header rows was pretty nice, we discovered a diamond by sorting the contents of this very strictly formatted table right in Word.

Here was the issue we faced. The Word 2007 RTF spec builds off of the Word 2003 spec. That means that creating the 2007 spec means adding all the stuff new to 2007 to the 2003 spec, and then changing the title of the spec. The formatting and layout of the spec must stay the same.

Part of this is updating the giant table in Appendix B with pages and pages of new rows. And of course, the table is in alphabetical order. So, we could:

  • Meticulously insert each new row one-by-one in alphabetical order. Very lame.
  • Add a bunch of new rows at the end of the table. Copy the entire table into Excel. Use Excel's sorting functionality. Paste the table back into the spec. Reformat it to look exactly like the table in the 2003 spec. Lame.
  • Add all the 2007 stuff to the end of the table. Click sort. Not lame.

We chose the latter and had time to enjoy one of the three sunny days we had here in Redmond, WA last year.

Table Properties

Actually, before we headed out, we wanted to know how much new stuff we documented and the total amount of stuff in the 2007 version of the spec. We could leverage the monster table to do in one of three ways:

  • Make sure header rows aren't repeating and count the number of rows in the table from the Word 2003 RTF spec (amount of existing stuff). Make sure header rows aren't repeating and count the number of rows in the table from the Word 2007 RTF spec (total amount of stuff). Subtract the amount of existing stuff from the total amount of stuff to get the amount of new stuff. Cry while typing up the email reporting the amount of new and total stuff.
  • Make sure header rows aren't repeating. Paste the table from the Word 2003 RTF spec into Excel. Note the number of rows and subtract one to account for the header row (amount of existing stuff). Paste the table from the Word 2007 RTF spec into Excel. Note the number of row and subtract one to account for the header row (total amount of stuff). Subtract the amount of existing stuff from the total amount of stuff to get the amount of new stuff. Sigh while typing up the email reporting the amount of new and total stuff.
  • Right click in the last row of the tables in the 2003 and 2007 specs. Click Table Properties and select Row. Note the row number and subtract one to account for the header row. Subtract the amount of existing stuff from the total amount of stuff to get the amount of new stuff. Smile while typing up the email reporting the amount of new and total stuff.

So we faced a nearly fifty-page table and necessary discovery or necessary insanity. We discovered repeating headers, sorting, and table properties, and thus I'm able to chat with you today.

-Jonathan

Published Tuesday, March 25, 2008 5:30 PM by wrdblog

Comments

# re: Necessity is the Mother of Discovery

Guys, you are the Word Team...so I really hope you just wrote to have a bit of story that you've newly discovered these functionalities which have been in Word versions for over 10 years during updating the specifications for Word 2007.

Sunday, March 30, 2008 7:00 AM by ???

# re: Necessity is the Mother of Discovery

Interesting stuff, indeed. We've found the Word 2007 RTF much improved in general.

Monday, March 31, 2008 8:59 PM by Word Troubleshooting

# re: Necessity is the Mother of Discovery

"necessity is the mother of invention." is not an idiom; it's an adage.

Wednesday, April 02, 2008 10:58 AM by WordGuy

# re: Necessity is the Mother of Discovery

Guys, this is more of a support question and this is not really the forum to ask it, but I'm running out of places to ask it.  The usenet groups are useless on this.  It does fit the title quite well.

Me and a ton of people in my organization use the ability to paste links to excel charts in our daily business.  It's not an exagerration to say that our livelyhood depends on it.  As of 2003 SP3 and / or 2007 (I don't know even if SP1 is required to break this), we are unable to paste links to named Excel ranges.  It is imperative that the link to the named range is pasted, as RC-type links to not update as the range is manipulated (say, a row / column inserted).  

Most people that use this functionality are simply not sophisticated enough to be burdened to do an RC-style link first, then editing the {LINK} field to change to a named range reference; besides, the sheer number of the links we use makes this workaround unacceptably tedius.

What is going on and how can we fix it?

Thanks in advance for your help.  You can always reach me at ilya DOT barkskiy AT cbre DOT com.

Ilya

Wednesday, April 02, 2008 3:41 PM by Ilya Barskiy

# Bug Report

I know this is the wrong place to post this, but I can't find the right place to post it.

I've found a critical bug in Word 2007 when working with a text that has undergone multiple revisions.  If a portion of the text is copied and pasted into a program OTHER THAN WORD, the ORIGINAL version of the paragraph will be pasted, not the final version that appears on the screen!  I was copy-pasting some paragraphs from Word into a text file and was surprised to find that heaps of mistakes had been re-entered into my document!

I took a video of this happening - if you contact me at dbaston A=T gmail I can send it to you.

Thursday, April 03, 2008 11:11 AM by Dan

# re: Necessity is the Mother of Discovery

Dan--

What is pasted depends on the target application and which of the clipboard formats that they support. For example, Notepad will paste all of the text (both inserted and deleted). Office applications should paste the revised content. If your problem is with an Office application, please let us know which one. If it's with another product, I'd suggest checking whether that product offers an option such as Paste Special to let you select among the formats.

--Stuart

Thursday, April 03, 2008 1:50 PM by wrdblog

# re: Necessity is the Mother of Discovery

Ilya--

I believe that always converting named ranges to RC references was an intentional design change but am researching it currently. It may be that another customer scenario caused us to change our approach here. I will also try to find out if there is any work-around.

--Stuart

Thursday, April 03, 2008 1:53 PM by wrdblog

# re: Necessity is the Mother of Discovery

Stuart-

Thanks for the quick note.  The problem is not even that it's an RC-style reference (which would still present a problem since named ranges are "good style"... but that's besides the point).  You just can't paste a copied named range as a link because you get an object not found error message (dlg with an OK button only).  From what I have been able to dig up, somebody suggested (and I don't know how they would know), that in the code, the Word is picking up the link with both Range Name and RC references in there, which is why it can't find the object in the first place.  If that is the case, it just seems that the logic purging the RC reference from the linked name is missing, and it's actually a pretty trivial fix.

Thanks for your help.  We're really a bit desperate.  Our installed base is 2003, for the most part, but SP3 is being pushed as a part of critical packs and is finding its way onto machines, and, of course, as all corporations do, the upgrade to 2007 is imminent as soon as the temlates are cleaned up, but this needs to be working in order to not cause major headaches.

Thanks again,

Ilya.

Thursday, April 03, 2008 5:11 PM by Ilya

# re: Necessity is the Mother of Discovery

Well, this is a bit off-topic as well but I guess it's important for many customers. I've got some questions regarding the ISO-Certification of OOXML:

I've read in:

http://www.heise-online.co.uk/news/ISO-makes-Microsoft-s-OOXML-document-format-an-official-standard--/110456

<<The vendor will be forced to thoroughly revamp its current Office standard storage format for the upcoming initial implementation of the "new" OOXML.>>

Is that true? Will there be an update of Office/Word 2007 to follow the "new" OOXML specifications?

And is there already a roughly estimated release date for this?

Friday, April 04, 2008 4:59 AM by Stefan Word2k

# re: Necessity is the Mother of Discovery

The primary reason that we created the Word blog and why many of us write articles is to describe ways for working with some of the features in the products, to hear others' thought about ways to address those scenarios (like Eric's post about columns and Pam's post about allowing single lines at the top or bottom of pages to use less paper), and to hear about other things that folks would like to do with Word.

What we want to avoid is for the blog becoming a mechanism for reporting bugs or troubleshooting. We're working on a post to provide some information about resources for both of those goals but we want to not use the blog for those purposes.

Because we'd already started some conversations about problems, we'll give a status update for those:

Table of Authorities (m_anter on Making your Output Greener): The direction in the article work fine for me in Word 2007--once I started clicking the Replace button instead of OK. There's a link for feedback on that article that might be a good route for more info as well.

Paste as Link from Excel 2007 (Ilya Barskiy on Necessity is the Mother of Discovery): I see the problem in Office 2003 and have reported it as a bug that we would likely address for the next service pack. I do not see the same problem in Office 2007.

Creating Template links after download (kevotheclone): Office Online copies the template locally and then creates the new file (making the document link to the local copy). Creating a document from a template on SharePoint 2007 links the document to the template in the SharePoint library. For an Word / IIS solution, you would need code on the server side that was either copying the file before the create new action or updating the template reference in the newly created document; both of these would be solutions outside of Word itself (though the latter could leverage the Word object model).

Word template locking model (Bhavin on Word Q & A): We are still investigating this issue to understand any changes from previous versions but looking at the scenario as we would solve it today the current design does make sense form a security standpoint.

Open Office XML Support (Stefan Word2k on Necessity is the Mother of Discovery): The best source for more information is probably Brian Jones' blog at http://blogs.msdn.com/brian_jones/default.aspx.

Sunday, April 06, 2008 4:48 PM by wrdblog

# I Have Questions You’re Not Posting About

Following up on Stuart's comment about the purpose of the Word Team Blog, here are some great resources

Wednesday, April 09, 2008 5:23 PM by The Microsoft Office Word Team's Blog

# re: Necessity is the Mother of Discovery

Stuart,

I fully recognize that I have taken this discussion a bit off topic, and I pointed that out in my post.  That was also why I provided an e-mail address. It is just incredibly difficult to get a hold of the right people through ordinary means, including the ones you posted in the new blog entry (which is still incredibly useful).  

That was by no means an attempt to hijack the discussion.

Thanks for all your help,

Ilya

Saturday, April 12, 2008 5:20 PM by Ilya

# re: Necessity is the Mother of Discovery

Ilya--thank you. the tone of your original post (and those of everyone who asked questions) was very helpful and positive. We hope you continue to find the blog useful.

--Stuart

Monday, April 14, 2008 1:26 PM by wrdblog

# Microsoft Help

Just want to say thanks. I found this blog very Helpfull and Usefull.

<a href=http://www.iyogi.net/microsoftoperatingsystem.html>Microsoft Help</a>

Thursday, April 17, 2008 7:08 AM by Microsoft Help

# re: Necessity is the Mother of Discovery

Microsoft Help - Thanks for the love, and I am glad you found the post useful.

-Jonathan (MS)

Thursday, April 17, 2008 2:39 PM by wrdblog
New Comments to this post are disabled
 
Page view tracker