Saturday, December 27, 2008

"Start Inking" button in Word 2007 does nothing

When I write papers on my tablet PC I occasionally switch to tablet mode and use ink to create my revisions. Sometimes, however, I open the inking ribbon and click "Start Inking," but nothing happens. I have puzzled with this for a long time, and came up with some workarounds, including copying the body of my document into a new file (I incorporate my actual changes in a different window and throw away the inked document anyway). But as it turns out, there is a slightly better solution. Apparently, the problem comes from page numbers. If you have page numbers, you cannot "start inking." If you remove them, you can.

Another howler from Word 2007. Why can you not ink when you have page numbers? Why do you get no response from the button instead of an error message?

Saturday, November 8, 2008

Word: Word 2007 bibliography system is full of fail

I am trying to write a humanities paper using the bibliographic/source management features in Word 2007. As far as I can tell, the system is almost completely worthless.
Here are my problems so far:

1. When you attempt to generate a Works Cited page, you get a list of all the sources that are in your source database, regardless of whether or not all of those sources are actually cited in your document. WTF? This is effectively a Works Consulted list, not Works Cited. Why does it work like this? I imagine there are some fields of scholarship where it's traditional to list works that are not actually cited, but this is certainly not the case in the humanities, which, I should note, does not represent an insignificant body of scholars, yet there does not appear to be an option to show only the cited works--you have to edit the generated stuff by hand.

2. The generated bibliography and works cited come out in the Word 2007 font (Cambria or something like that) that no one wants to use and that you can't seem to make go away. Also the "Works Cited" or "Bibliography" text at the top of the generated section is blue. Am I supposed to submit my research with colored fonts? I don't see a way to tell the generated section to pick up the font and styles from the surrounding text.

3. The MLA formatting generated in the Works Cited page is wrong. When you have multiple works by a single author, you are supposed to have the author's name written out for the first work, and then use a line or three hyphens for subsequent entries by that author. This is stated clearly in the MLA guidelines, but inexplicably is not understood by Word.

I may end up buying something like EndNote to get the job done.

Edit:

I have bought EndNote, and it also contains a good amount of fail. For example, there is no simple way to create an in-text citation consisting of only a page number, i.e. without an author and without a title. MLA occasionally demands this, specifically, if you have just named the author and the work in the body of your text. EndNote does give you the ability to easily remove the title, but not the author. Why?

Friday, December 21, 2007

SharePoint: How to make navigation headings inherit to subsites

I've seen several messages on newsgroups and the web about this problem. You set up "current navigation" on some site, and you want all of the subsites to have the exact same navigation. The problem is, if you include "headers" in your top-level navigation, they (as well as the links underneath them) do not appear in the navigation of subsites, no matter how much you play with the navigation in the subsites. I'm not sure if this is a bug or if it's by design. I haven't tested the following solution in multiple situations but it might work for you.

1. Add this assembly reference to the master page of the level where you want to supply the authoritative navigation:

<%@ Register Tagprefix="PublishingNavigation" Namespace="Microsoft.SharePoint.Publishing.Navigation" Assembly="Microsoft.SharePoint.Publishing, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %>

2. Add the following PortalSiteMapDataSource definition to the same master page:


<PublishingNavigation:PortalSiteMapDataSource
ID="SiteMapDSWithHeadings"
Runat="server"
SiteMapProvider="CurrentNavSiteMapProvider"
EnableViewState="true"
StartFromCurrentNode="true"
StartingNodeOffset="0"
ShowStartingNode="false"
TrimNonCurrentTypes="None"
EnableInheritance="True"
/>



3. Find the line that says

<SharePoint:AspMenu id="QuickLaunchMenu" DataSourceId="QuickLaunchSiteMap" runat="server" Orientation="Vertical" StaticDisplayLevels="2" ItemWrap="true" MaximumDynamicDisplayLevels="0" StaticSubMenuIndent="0" SkipLinkText="">

(i.e. the line that begins the definition for your quick launch control).

Change the DataSourceID from "QuickLaunchSiteMap" to "SiteMapDSWithHeadings".

4. Make sure your subsites inherit their master page from parent.

5. In your subsites, under Site Settings->Modify Navigation, set Current Navigation to "Display the same navigation items as the parent site."

Your subsites should now inherit all of the links and headings from the Current Navigation of their parent.

Wednesday, December 12, 2007

InfoPath: How to exit from a browser form and suppress the "save changes" dialog

If you create a browser-based InfoPath 2007 form and use a programmatic submission procedure instead of the built-in submit button, the user may get a "save changes?" prompt when clicking the Close button on the form's toolbar. There are several ways you could avoid this in InfoPath 2003. One would be to set the form's dirty bit to false using the setDirty() method. Another is to programmatically close the form with your own button. I have not seen code to do either of these things in 2007 with managed C# code. Here is my workaround:

Create a button on the form. Add a rule to the button that closes the form on click. Unhide the button when the user clicks your custom submit button.

Tuesday, December 4, 2007

InfoPath: How to programmatically switch the view

The view can be programmatically changed in C# managed code like this:

this.ViewInfos.SwitchView("
name of view");

InfoPath: How to display images in browser-based forms

Use the following method to add an image to a browser-based form in InfoPath 2007 using C# managed code:

Your image must be available somewhere by URL.
1. Add a rich text control to the form.
2. Add the following code to the form:

XPathNavigator ng = MainDataSource.CreateNavigator().SelectSingleNode("XPath to the binding of the rich text control", NamespaceManager);
ng.AppendChild("<img xmlns=\"http://www.w3.org/1999/xhtml\" src=\"URL of your image\" />");

This modifies the XML node of the rich text box, adding an XHTML image as a child.