I don't have Word or Windows so I tried solving your issue with Libreoffice and .odt
files. The following code seems to work:
call vimfiler#set_execute_file('odt', 'libreoffice')
augroup vimfiler_mapping
autocmd!
autocmd FileType vimfiler nmap <buffer> x <Plug>(vimfiler_execute_vimfiler_associated)
augroup END
Maybe you could tweak the code for your needs:
call vimfiler#set_execute_file('doc', 'path/to/MS Word')
augroup vimfiler_mapping
autocmd!
autocmd FileType vimfiler nmap <buffer> x <Plug>(vimfiler_execute_vimfiler_associated)
augroup END
The autocmd installs a buffer-local mapping on the x
key whenever you open a buffer whose filetype is vimfiler
.
And as muru explained in the comment, the call to the function vimfiler#set_execute_file()
appends a new item in the dictionary g:vimfiler_execute_file_list
whose values are command names designated to open the files with the extension stored inside the associated keys.
For more information, see:
:help vimfiler#set_execute_file()
:help <Plug>(vimfiler_execute_vimfiler_associated)
:help g:vimfiler_execute_file_list