PDA

View Full Version : Programtacially switch off Thumbnail view



fionabolt
02-14-2008, 09:22 AM
Anyone know how I can programatically switch off Thumbnail view throughout the Word Application?

The code:
Application.ActiveWindow.Thumbnails = false
Only switches off the thumbnails in the active document.

I want to switch it off throughout the application.

This is because I have some code that creates one document from the template, and then depending on the users preference from a dialog box, adds new documents to the collection of open documents.

Because these new documents, may have thumbnails switched on, I am encountering problems with later aspects of the code. And so really want to switch off Thumbnail view throughout the Word Application.

I have tried the following:
Dim oCC As Object
Set oCC = CustomizationContext
CustomizationContext = NormalTemplate
bTHUMB = Application.ActiveWindow.Thumbnails
Application.ActiveWindow.Thumbnails = False
CustomizationContext = oCC

Any help would be appreciated.

PS - I am using Word 2003
PPS - to replicate the issue.
1. Open Word,
2. Click, View>Thumbnails.
3. Close Word again (unless you close Word the setting will not be stored in your application).
4. Open Word again, every new document you create will have Thumbnails switched on, even if you switch it off in one document, the next new document you create will have Thumbnails switched on again.

Trevor
02-18-2008, 04:54 PM
try pictureFormate.Thumbnail = false

or Me.Thumbnail = false

fionabolt
03-03-2008, 04:50 AM
I'm still looking for a solution to this one. Anyone got any ideas?

fumei
03-03-2008, 04:21 PM
I do not have 2003 - and therefore no Thumbnails - but I can see from your code that it is an ActiveWindow property. NOT a document property.

So, loop through the Windows collection and turn it off for all of them. This is of course not a permanent switch. If you add a new window - and adding a document will do so - then you would have to run through again.

However, if having Thumbnails on messes up your code...why is that anyway????...

"then depending on the users preference from a dialog box, adds new documents to the collection of open documents."

why not simply switch Thumbnails off when these new documents are added? Obviously they are added via code (or so I assume), so why not just add a Thumbnail off into that code?