M
msafro
I am trying to access WebDAV resources using MS Office client. It
generally works however there is one problem. When I open the document
I am prompted to enter user name and password. I open document using
script and I already have credentials inside the script so I wonder if
this is possible to pass the credentials to the Word, Excel, PowerPoint
object somehow so I would not be promted again?
Here is the code:
if (url.indexOf(".doc")>-1
||url.indexOf(".rtf")>-1||url.indexOf(".txt")>-1) //check if pdf
document
{
var objWord = new ActiveXObject ("Word.Application"); //if not open in
word formatter
objWord.visible = true;
objWord.Documents.Open("http://ntotlldev/livelinkedav/"+url);
window.setTimeout('window.close()',5000);
// alert("here")
}
else
{
document.location.href="http://something/WebDav/"+url;
//otherwise open through the browser
if (url.indexOf(".pdf")>-1)
{
window.resizeTo(screen.width,screen.height);
}
else
window.setTimeout('window.close()',5000);
}*/
Thanks
Michael
generally works however there is one problem. When I open the document
I am prompted to enter user name and password. I open document using
script and I already have credentials inside the script so I wonder if
this is possible to pass the credentials to the Word, Excel, PowerPoint
object somehow so I would not be promted again?
Here is the code:
if (url.indexOf(".doc")>-1
||url.indexOf(".rtf")>-1||url.indexOf(".txt")>-1) //check if pdf
document
{
var objWord = new ActiveXObject ("Word.Application"); //if not open in
word formatter
objWord.visible = true;
objWord.Documents.Open("http://ntotlldev/livelinkedav/"+url);
window.setTimeout('window.close()',5000);
// alert("here")
}
else
{
document.location.href="http://something/WebDav/"+url;
//otherwise open through the browser
if (url.indexOf(".pdf")>-1)
{
window.resizeTo(screen.width,screen.height);
}
else
window.setTimeout('window.close()',5000);
}*/
Thanks
Michael