Webdav and Word

R

Roberto Ricca

*From a web page*, I'd like to access a .doc file that lies on a webdav
server and modify directly the document in an exclusive way.

What should I do?

I tried with a javascript. Something like

<html>
<head>
<title>Working on webdav docs</title>
</head>

<script language="javascript">

function OpenWord(webdav, doc1) {
var w = new ActiveXObject("Word.Application");
w.Visible = true;
w.Documents.Open(webdav + "/" + doc1);
return false;
}
</script>

<body>
<input type=button
onclick="OpenWord('file://///c:/somewhere', 'file.doc')"
value="Local File"/>
<input type=button
onclick="OpenWord('https://webdavserver/dir', file.doc')"
value="WebDav File"/>
<a href="https://webdavserver/dir/file.doc">DirectConnect</a>
</body>
</html>

When I click on "WebDav File", the "Word.Application" is activated (I
can see a new WinWord.exe with the Task Manager), but before opening the
document, it requests my credentials for accessing the webdav. It seems
fair, but my question is: how could I avoid this request? In other
words: how can I pass the credentials to the program without having to
input them manually?

I tried using "https://username:password@webdavserver/dir/file.doc" to
no avail: credentials are always requested before opening the file.

The page that I described above suggests that is also possible to click
on "DirectConnect". When I do that, by default, a *copy* of the document
is opened in some local directory. However, after setting the registry
key
'HKEY_CURRENT_USER\Software\Microsoft\Office\11.0\Common\Internet\OpenDocumentsReadWriteWhileBrowsing'
to 1, the document is opened directly in the current or in a new
winword.exe instance. Unfortunately webdav credentials are asked again
the first time that winword.exe is activated and I am back to square
one.

It would not help anyway, but I noticed that if I open the document
directly with MS Word, credentials are requested only the first time. It
looks like Winword.exe is caching them and as long as Winword.exe
remains active, credentials are not requested anymore.

I am testing with IE7 and MSOffice 2003, although our customers will use
MSOffice 2007.

Thanks in advance,
Roberto Ricca
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top