Archive for the 'Office' Category

Document Conversion Service and Images

It’s worth noting, the document conversion service doesn’t convert embedded images – which is a pain (and why? They’re available as image files inside the .docx file! Come on Microsoft, that’s craaaazy!)

Instead, you have to insert them as linked objects :

Objects such as images that you add to your Word 2007 document will not appear on the converted Web page if they are embedded in the document. To add these objects so that they appear on the converted Web page, first upload these objects to a document library and then insert them as linked objects (from this location) rather than embedded objects in your document.

There are some instructions here, but this is my guide:

First, find your image on your web page. In SharePoint, this might be a Picture Gallery. Copy the image by Right Click > Copy

Go to Word, and Paste > Paste Special…

The Paste Special Menu

Select that you want HTML Format :

And congratulations, you’ve inserted a link to the image on the web server, rather than the image itself:

Restrict or Permit formatting changes in Word Documents

Word 2007 lets you restrict the styles and formatting people can use in documents based on a particular template. I suspect that this will be useful for me in restricting the styles used in SharePoint’s Rich Client Authoring (aka Smart Client Authoring – I wish they’d pick a terminology).

Just as a quick example, though, you get do this through the manage styles dialog. To open this, open the styles menu from the ribbon, and select the manage styles option: Read more »

Missing Content Type fields in the Document Information Panel

The Document Information Panel is great – it allows you to surface metadata to be filled in about a Word 2007 document in the client.

Document Information Panel Correct

This is great, but I had a bit of a puzzling problem. I’ve set Libraries up to use this features many times now, and it’s pretty straight forward – I’ve added columns to the library, and then the template document for the library has included those columns. Thus, you just go into your document library, click new, and you get a blank word document with the correct document information panel thing. Sometimes I’ve modified that template, but that’s pretty straight forward through the Library Settings pages (Document Library Settings > Advanced Settings > Edit Template).

This time, though, I was using content types (i.e. setting up the library properly), rather than just adding columns directly to a list. Content Types encapsulate (amongst other things) their own set of metadata to be captured – so in other words, they define columns to be added to a list. That’s fine (and very useful).

However, when I went to my document library, clicked ‘New’ and selected my Content Type, I got a blank word document with only one field in the document information panel – title. The blankness was expected (I’d not defined my own template) but none of the other bits of metadata I’d defined for my content type were there. This was a bit of a puzzle. What was different?

Well, after much thinking, I realised something – Content Types ‘inherit’ from each other. My Content Type derived from the Document content type, which specified just one field of metadata – Title. Then it hit me – content types themselves have document templates. My new content type was inheriting from Document, and it was still using the Document content type’s template document. I specified my own template document for my content type and suddenly I had all of my fields available in the document information panel.

It is interesting that there is this difference between the document information panel fields being defined by the library when just using the default ‘Document‘ content type and no others, and the fields being defined by the content type you’ve created if you’re using other types (I.e. you’ve enabled ‘Allow management of content types’ on the Document Library Settings > Advanced Settings page).

Related to this, then, is the question of what happen if you add a column to a list. However, I’ll cover this in another post.

Error: “The document information panel was unable to load”

I was building a demo where I was wanting to show the document information panel in Word 2007 (which I think is one of the neatest features about it!) . It should look like:

Document Information Panel Correct

But instead I was getting “The document information panel was unable to load“.

Document Information Panel Error

I couldn’t see a reason for this, but investigation found this post which shows the same error, and a solution in the comments:

The System Event Nofication Service (SENS) uses the same communication “channels” (not the correct word, but works) as does office products do in communicating with the server.
Stop and disable the SENS service on the server and everything will work perfectly.

So, open a command prompt and type:
net stop sens

Bit strange, but that fixed it for me. Also note the comment at the bottom that the Document Conversions service doesn’t work on a single server demo system like this.

Why does Microsoft treat bookmarks so badly?

I hate bookmarks in Word documents. Word links headings and the table of contents nicely, so you can click from the table of contents to a section easily. Still, Word supports them, so some folks use them, which I guess proves that “if you build it they will come” really is true irrespective of how dull the activity is.

My problems with bookmarks in Word is that they are invisible and inflexible. You can’t see them initially – and to show them requires a trip to The Office button > Word Options > Advanced > Show Document Content section > Show Bookmarks. Finding that took a fair bit of work for me – how well is someone less computer literate going to do?

Secondly, bookmarks are difficult to move. The easiest way is simply to redefine them. This is a bit sad – I’m pretty sure that back in the 1980’s I remember using a Mac word processor, which displayed a little ‘Anchor’ icon for bookmarks, and it could be dragged around. Why can’t we have that? I mean, yes, we can bookmark actual bits of text – but really, having something that applies at the line level is just as useful.

Bookmarks in SharePoint are somewhat similar, but worse. You can create bookmarks in the content editor web part – just click the ‘create hyperlink’ icon, and in the dialog supply a bookmark name. If you’d some text highlighted in the editor, well, it’ll now appear as a link (which is hardly ideal) – and if not, well, you’ve now got a bookmark you can’t see, unless you go into the HTML. Worse, though, is that Bookmarks are actually much more useful in the context of a web page, to allow you to direct users to a certain part of the page.

So here’s my request – Microsoft, if you’re going to have bookmarks, make them visible, make them easy to create, delete, move and link to.

I guess I’ll have to look into other content editor parts, just on the off-chance….

Problems with the extensibility.dll in Outlook add-ins

On and off I’ve been writing an Office add-in for Outlook. We’ve reached the point of testing, but when we installed it on a clean machine, it wouldn’t run. There was an error message complaining about not having the Extensibility.dll installed. “Odd” we thought. We’d been careful to install the Outlook PIAs (Primary Interop Assemblies), and no-one had heard of this assembly before.

Well, it appears that this assembly is installed with Visual Studio, but it isn’t installed with the PIAs. Nice. Fortunately Gunnar Peipman has an extremely timely post on this - I’d been looking at the Extensibility.dll in the GAC, but apparently there is one under Common Files too. I’m not sure where is has to go though – the GAC, the application folder, or into the common files directory. I’ll report back when I figure this out…

What I’d really like to know, though, is why this file isn’t part of the PIAs? I mean, what are you going to do with them if you aren’t writing an add-in?

The Curious Incident of Saving a Word document to MOSS in the night-time…

Well, okay, night-time has little to do with it.

When I try to save aWord document, I get shown the ‘Save As’ dialog.

Word Save As dialog

On it there is the ‘Favorite’ panel (UK English clearly doesn’t apply) and the option of ‘My SharePoint Sites’. Great! Wrong! If I click on the the ‘My Site’ shortcut, it changes the name of my document (‘fixer.docx’ in this case’), and if I double click, it tries to save the document as a file called .docx. The error I then get it ‘Word did not save the document.http://moss:4000/personal/burnsaw/.docx’.

Well, I can see why the error in saving, but huh? What happened to the file name? It wasn’t even the wrong file name of ‘My Site’ – there was no file name at all!

Step two was to repeat, but try using the Word’s ‘Publish > Document Management System’, but got the same result.

Step three was to open up a new document from the library, and try saving back. This highlighted another problem we’ve got – users getting prompted for network credentials when opening a document from SharePoint (this doesn’t happen every time, just the first time each user session). That accepted, it worked and opened a Word document. I typed some text, and did a ‘Save As’. I was shown this dialog:

Word Save As for SharePoint dialog

Hmm. That’s more promising, and it does save to that library correctly. So what do I notice? Well, the address bar is quite different, which is unsurprising as the top one is looking at a folder of local shortcuts. But the URL it’s pointing to is correct.

I don’t know what is going on here, but it has that irritating WebDav feel to it.

The registry and "Word could not create work file"

I had an interesting problem earlier this week. I had a MOSS VM that seemed to work okay, except whenever I tried to create a document using the template on a Document Library. Then I would get the error:

Word could not create work file. Check the temp environment variable.

Okay. So I did – and the temp variable was just fine. Odd, I thought. Eventually, after digging through news groups and so on, I found a suggestion to check parts of the registry. Well, actually, one of my colleagues found it. The value in the key

HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders\cache

was wrong – it pointed to an invalid directory. Not sure why, but I’d been monkeying around with some stuff which could’ve mucked it up. Anyway, fixed up the filepath in that key, and it was fine – I could create documents from Document Library templates.

Office and Workflow Integration – Version WTF?

Dear Microsoft – The word Ultimate means ‘Final’. Somehow, I suspect there will be future versions of Office and Windows – what do y’reckon?

Okay, so I’m a simple man really…

I’d been asked to demo a custom workflow to a customer. They’d some fairly clear requirements, and we just wanted to knock up a prototype. It was all about filling in ‘fields’ in a word document. “Great”, I thought, “we can allow them to do this entirely within Word”. And, looking at the marketing bumpf, the demos and the docs, yeah, we could. The workflow task could be displayed in MOSS, and the document properties pane would expose any other fields they needed.

Except… …I couldn’t get the ‘Edit this Task’ button to appear in Word. I know it should be able to – but it wasn’t. I tried everything; nope, nothing. In the end, I ran out of time – but one of my colleagues, of a slightly curious nature, kept plugging away at it.

It turns out, it was the wrong version of office. It used to be that versions of things were simple – there only was one for each ‘iteration’ of the software. Then we started getting ‘Home’ and ‘Professional’ – which was okay, and seemed sensible, to be honest. I liked that – it was simple, just like me. Read more »

MCMS PowerPoint Slide Shows being converted from PPS to PPT

So I found that PowerPoint slide shows that had been added into MCMS were being retrieved as just plain PowerPoint files. What this really meant was that the file’s mime-type and extension had been changed from ‘PPS’ to ‘PPT’.

This was a pain – it’s just not as pretty as having the file open as a presentation.

It turns out the culprit for this was IIS – it didn’t have a mime-type defined for ‘.pps’. I fixed this using the advice from Microsoft’s support pages – PowerPoint Show (*.pps) file copies as a PowerPoint (.ppt) file from an IIS Web server.

What the article doesn’t mention, though, is that for MCMS, this change needs applied not to the website, but to the ‘NR/rdonlyres’ directory within the MCMS site.

« Previous PageNext Page »

 Subscribe in a reader