Recently one of our clients had decided not to just preview PDF documents from the SharePoint library, but to edit it and save to the same location.
Because Adobe is not integrated with SharePoint, when you open a PDF file for editing and save it, it will not save to the source location (Document library), but instead it will save it to one of the folders on your hard drive depending on the preferences. In my case, client wanted to open these PDF's from tasks that were created through "Collect" action in SPD (they served to provide additional information on the approver's disposition) as you might know this action creates a content type and associates ASPX page used to collect information. Users expected to open up the task associated with approval of this PDF document, open up the document they were about to review from this Task, provide some comments within the document, save this PDF to the source location and state their disposition in the task Item as well. Through the addition of XSL within the ASPX page associated with this Task content type I've achieved the desired functionality:
Before, the link to the document that triggered associated workflow to create a task looked something like this:
Document: <a href="{substring-before(@WorkflowLink, ', ')}">
<xsl:value-of select="substring-after(@WorkflowLink, ', ')"></xsl:value-of>
</a>
This piece of code would output name of the document with link to the document.
I've modified it to open the location (folder) of this document through the Windows Explorer (WebDav interface), luckily I have only one document per folder:
Document: <a href="#" onclick="NavigateHttpFolder('{substring-before(substring-before(@WorkflowLink, ', '),substring-after(@WorkflowLink, ', '))}', '_blank');"> <xsl:value-of select="substring-after(@WorkflowLink, ', ')"></xsl:value-of>
</a >
As soon as you open PDF Document through the WebDav Interface, by default Adobe will save this document after editing it in the same location.
...BUT... yeah, there is always a catch.
When you try to open Office document, such as word document, you will get an error "Your Client does not support opening this list in Windows Explorer".
Here is your answer:
http://support.microsoft.com/kb/923906/en-us even though it describes this error from the "Actions" menu, but when you dig dipper it all boils down to the problem described here, as limitation of characters in your URL to only 100 characters.
http://support.microsoft.com/kb/325355/
Yes, it is your answer, if you are running IE 6.0.2.8... or earlier, but what do you do if it is not the case and you are getting this error anyway. I have IE 7 and office 2007.
I personally tried almost every patch, and download, and IE settings out there. We opened a support ticket with Microsoft, no solution. NOTHING WORKED, I've stumbled upon some forum threads that were ended on a hopeless note.
In my case the answer was within the actual XSL, apparently the problem can be resolved by the reformatting the URL used within the onClick command.
if before the HTML output from this line :
Document: <a href="#" onclick="NavigateHttpFolder('{substring-before(substring-before(@WorkflowLink, ', '),substring-after(@WorkflowLink, ', '))}', '_blank');"> <xsl:value-of select="substring-after(@WorkflowLink, ', ')"></xsl:value-of>
</a >
was
<a href="#" onclick="NavigateHttpFolder('', '_blank');"> as you can see no URL id being supplied here, what is even stranger is that the URL was always there for PDF documents, but not for the office documents.
If you replace each "/" with "\u002f" within your link variable (in my case it's @WorkflowLink) it will work just fine :-)Once I replaced the previous code it with:
Document: <a href="#" onclick="NavigateHttpFolder('{translate(substring-before(substring-before(@WorkflowLink, ', '),substring-after(@WorkflowLink, ', ')),'\','\u002f')}', '_blank');"> <xsl:value-of select="substring-after(@WorkflowLink, ', ')"></xsl:value-of>
</a>
The HTML output was the correct one, for all types of documents!
Document: <a href="#" onclick="NavigateHttpFolder('http://portal/Documentlibrary/FolderName/', '_blank');">
This work around allowed me to open WebDav for particular folders
lesson learned, before you start looking for patches even though your system should be fine, go into the source code and look at what actually happens there, are you providing all the right values?
This post should have been re-titled though, but....
Enjoy
Note: do not get hang up on this part "substring-before(substring-before(@WorkflowLink, ', '),substring-after(@WorkflowLink, ', '))" It's just a way (in my case) to extract the URL to location of the document. By the way in some instances you might not even need to replace "/" with "\u002f".