Bug in launching office templates from DOpus

I think this is a bug: DOpus does not launch Microsoft Templates correctly when you double-click on the template file.

When I right-mouse click on a .Microsoft Word template file (.dot), whether in DOpus or Windows Explorer, a shortcut menu appears which shows "New" and "Open" (amongst other things).

"New" is meant to open ms Word and display a new (unsaved) document, based on the template. "Open" is supposed to open the template itself, so you can edit it.

The default behaviour if you were to double-click the file, rather than use the shortcut menu, is "New". This can be verified by looking at the shortcut menu, where you will see "New" is in bold, and "Open" is not in bold.

In both Windows Explorer and DOpus, "New" and "Open" work correctly from the shortcut menus. So far so good! However DOpus gets it wrong if you double-click instead of using the shortcut menu. (Or in my case single-click as I never use double-click.) Windows Explorer correctly executes a "New", but DOpus executes an "Open", i.e. it doesn't execute the default action.

I got exactly the same problem when I tried it with an Excel Spreadsheet template (.xlt) file. So I suspect this is a general problem with the default behaviour of double-clicking file types from DOpus.

As I'm more likely to click a document than use the shortcut menu, I would like this bug fixed please !

Note I'm a registred user of Directory Opus 8.0.1.2.

JW

Hi there dude,

I'm not sure why Dopus is not using the registered default shell action for this filetype, maybe Dopus automatically assumes the default action should always be 'open' - or at least that the default 'dblclk' click event should always be 'open'?

What YOU can do to correct it, and make it behave the way you'd like is to:[code]

  • go to Settings->File Types.., on the menu bar

  • in the File Types dialog window, expand the 'System File Types' category and locate the 'DOT' extension item described as
    'Microsoft Word Template' and double click it

  • On the 'Events' tab of the edit window that appears, double click on the entry for 'dblclk' and make sure that the 'Function:'
    fields value is set to 'Standard Function (Opus or external)' - should be already, but just double check

  • in the edit part of the window at the bottom, copy and paste the following:

    ContextMenu VERB=new

...then OK all the way out and Close the File Type editor.[/code]There are other ways to fix this in Dopus, but this I think is the cleanest and won't mess with anything else in either explorer or the registry.

Thanks for that tip Steje. Entering the clause "ContextMenu VERB=new" for the dblclk event of the .DOT file type certainly did the trick.

I hadn't spotted "File Types..." on the "Settings" menu, probably because I had become used to going to "Preferences" to find things.

why on Earth doesn't DOpus include the event settings by default? I checked quite a few file types, and they all had "" for all their events. It looks to me like DOpus isn't picking up the event settings of ANY file type. Did the programmers overlook this or decide it was too difficult to do perhaps?

I noted DOpus has the same DDE settings for a .dot "Open" as does Windows Explorer. They both have the "/n" flag, which causes MSWord to create a New Document based on the .dot file, rather than opening the .dot file for editing. So Dopus does know how to open .DOT files properly, it's just lazy about its event handling, and probably does a quick and dirty Open without looking up the full DDE command line from its own settings.

I would make the following point to the DOpus Development Team:

To enter all the event settings for every file type would be a mammoth task, and should not be something to expect end users to have to do for themselves. This is after all meant to be a Windows Explorer replacement!

why don't you get DOpus to point it's double-click event handler at its own Open command for each file type? (or whatever the default action is for the file type). Then users wouldn't need to attach strange clauses like "ContextMenu VERB=new".

By the way Steje, do you know where the event settings are stored by Opus? Also where did you get the "ContextMenu VERB=new" syntax from? Is it in a programmer's guide somewhere? (I need to figure out the clause for other file types, such as .XLT templates.)

Regards,
John

The Opus dblclk action is an internal action to Opus that overrides the standard shell open action. So it's not that Opus does not 'include the settings' of any other filetype. If you look on the Actions you'll see an open action there for most filetypes. The Actions come from Explorer, the Events come from Opus.

Hi John,

First let me just say that I am a user like you and not affiliated with GPS at all... What I've put forth in this thread about the why-to's and where-for's of what's going on here are just guesses on my part. Based on those guesses I'm not so sure that Dopus has to do too much more than just to make sure that the dblclck event executes the default action. There seems to be a presumption made by Dopus that the 'default' handler used by an otherwise undefined dblclck event should always be open when in fact that is not always the case... I'll explain more about what I mean as I respond to each of your comments:

[quote]why on Earth doesn't DOpus include the event settings by default? I checked quite a few file types, and they all had "" for all their events. It looks to me like DOpus isn't picking up the event settings of ANY file type.[/quote]Along the lines of what I was saying above... Firstly, I'm not so sure what you're seeing (or in this case - NOT seeing :slight_smile:) is as dire as it might seem at first glance... does Windows Explorer itself even really support different 'click/key' specific events such as those laid out in Dopus' File Type editor? Certainly the dblclck is a standard - and usually does mean 'open' though in the case of a .DOT file is not true... This situation seems to bring to light a few things:

a) Dopus seems to assume dblclck = open, and doesn't seem to be aware of the 'default' setting for each file type which can be set by Windows Explorer->Folder Options...->File Types->Advanced->Set Default.

b) Even so, Dopus let's you customize extended mouse events that I don't "believe" Windows let's you do... such as set the action to take upon 'dblclckalt' and what not. This is why I don't think that seeing alot of for the various events is too big a deal... if Explorer doesn't allow configuration of these mouse events, you're not missing anything.

[quote]I noted DOpus has the same DDE settings for a .dot "Open" as does Windows Explorer. They both have the "/n" flag, which causes MSWord to create a New Document based on the .dot file, rather than opening the .dot file for editing. So Dopus does know how to open .DOT files properly, it's just lazy about its event handling, and probably does a quick and dirty Open without looking up the full DDE command line from its own settings.[/quote]I know I keep going back to 'my' assumption that Dopus 'assumes' dblclck = open, so let me explain...

  • Look in the registry under HKCR/.dot
  • You'll notice that the Default value of the .dot key is a linkback to the file types 'descriptor' = Word.Template.8
  • Also located under HKCR is a the related reg key for Word.Template.8
  • Under the Word.Template.8 reg key is a series of sub-keys, one of which is shell.
  • the Default value for the shell sub-key for a given file type is where Windows Explorers File Type editor registers the 'default' action for the file type. And as you can see in your registry, this value for the .dot/Word.Template.8 file type is New which corresponds to the New sub-key located in turn under the shell key.
  • It's these bits of info I think that explain the difference in Dopus' handling of the .dot files... if you look at the ddeexec key's Default value for shell\Open you'll see that the DDE message (in the Default value) is exactly the same as what's in Dopus' File Types editors' DDE Message: string setting for the Open Action. It's the DDE switches FileOpen versus FileNew (which you'll find specified under the shell\New\ddeexec key) that explains the difference in behavior between 'Open' and 'New'... not the /n flag in the call to the application. You could have fixed this problem a different way by editing the DDE Message: string in Dopus' File Types editors' Open Action to say "[REM _DDE_Direct][FileNew("%1")]"... but then I believe this would have altered the actual shell\Open\ddeexec registry data, which would have changed the way selecting 'Open' from the right click menu behaves within Windows Explorer... which is not what you really wanted to do.

[quote]By the way Steje, do you know where the event settings are stored by Opus?[/quote]Based on the registry keys I mentioned above (HKCR.dot and it's Default value linkage to the file descriptor key also under HKCR) you'll find that under the file descriptions related reg key, along with the shell sub-key you also get an opus sub-key. But I believe you ONLY get this once you've made manual changes to the event handling for that file type within Dopus File Types editor...

[quote]Also where did you get the "ContextMenu VERB=new" syntax from? Is it in a programmer's guide somewhere? (I need to figure out the clause for other file types, such as .XLT templates.)[/quote]Well, I have SOOO much junk on the default Windows Context Menu... Rather than hack the registry or try and re-config all the individual applications overcrowding my context menu, 'disabling' the default Windows context menu and tweaking my own through Dopus was the route I felt was best for me... Amongst the help documentation explaining the things you can do with the Context Menu and Drop Menu I found the CONTEXTMENU command. When you use it with the 'VERB=' switch all you're basically telling Dopus to do is to run the action or command specified after VERB= (in this case 'New') that would have been run if you had right clicked on the file yourself and selected that context menu item (i.e. like you said - right clicking on the .DOT file and selecting 'New' always worked for you).

[b]Tip[/b]- I've added the following to the Context Menu of 'All files and folders' in my Dopus File Types editor... [b]ContextMenu SHOWCMDS [/b] and given it a name of "Show all commands for this file type...". When I select this after clicking on a particular file type, I get a list of the various commands (referenceable by name as well as an "ID" number) allowed for this file type, which you can use with CONTEXTMENU command.In the case of .XLT files, you should be able to use EXACTLY the same command as we added for the .DOT file. The command is 'filetype' specific - so when you set the dblclk event for .XLT files, it will run the New command related to THAT filetype/extension, as per all the shell sub-key linkage we just went over above... Hope all this helps dude!

Hi Jon,

Just saw your reply to John after posting my big long winded breakdown of the details from my prespective... You've confirmed that Opus does indeed default to using the registered file types 'Open' for dblclk. For what it's worth, it seems to me that Opus should make the 'default' shell action the action that dblclk events call. Just my 2 cents...

I can confirm this as a bug; it will be fixed in the next release.

Cool, thanks alot for the quick reply Jon... you da man.