Enforcing file name policy in document libraries.

J

Johan Verrept

Hello,

I have been looking for a while now for a constructive way to enforce
filename policies in our sharepoint document libraries when saving from
Office, without results. I have looked into the following options:

* generating a default document name for saving in Word. I could not get
this to work. Depending on which SaveAs dialog I used, I could set the
initial filename but lose the URL to the document library or have the path
but no control of the initial filename.
* Using an ItemAdded or ItemAdding event handler on the sharepoint
document library. Refusing bad filenames is trivial, but renaming the files
to something useful resulted in Word not finding the file it has just saved
(since it was not told about the changed name).

I cannot imagine this issue has not come up a 1000 times already, yet I seem
unable to find any site, blog or newsgroup that has a solution.

Am I missing something obvious or is this just not possible?

Thank you for any suggestion, idea or solution!
 
J

Johan Verrept

Is this possible by using a VSTO solution? From what I can gather, this would
allow me to embed the url of the document library page into the document that
is being opened. That would allow me to generate the full path to the
document and use the normal SaveAs Dialogs.
 
G

galvin.paul

Is this possible by using a VSTO solution? From what I can gather, this would
allow me to embed the url of the document library page into the document that
is being opened. That would allow me to generate the full path to the
document and use the normal SaveAs Dialogs.










- Show quoted text -

You might want to abandon the idea of changing the file name this
way. I think a lot of people have tried and this seems impossible.

I wrote about it here and the comments all indicate that it can't be
done. (If you figure it out though, you'll be a hero):
http://paulgalvin.spaces.live.com/blog/cns!1CC1EDB3DAA9B8AA!655.entry

You might want to look at the base assumption though. Why are you
worried about the file name? When I hear this kind of requirement, it
usually relates to ease of search or something along those lines. If
that's the case, there are better ways to support good search.

--Paul Galvin, Conchango
RSS @ http://feeds.feedburner.com/PaulGalvinsSharepointSpace
Web site @ http://paulgalvin.spaces.live.com
 
J

Johan Verrept

In the end I gave up. Indirectly I ask the user for the path and set both
path and filename through an application file dialog. Not pretty.
This is a serious shortcoming from my POV.
 
T

Tom

Johan Verrept said:
Hello,

I have been looking for a while now for a constructive way to enforce
filename policies in our sharepoint document libraries when saving from
Office, without results. I have looked into the following options:

* generating a default document name for saving in Word. I could not get
this to work. Depending on which SaveAs dialog I used, I could set the
initial filename but lose the URL to the document library or have the path
but no control of the initial filename.
* Using an ItemAdded or ItemAdding event handler on the sharepoint
document library. Refusing bad filenames is trivial, but renaming the files
to something useful resulted in Word not finding the file it has just saved
(since it was not told about the changed name).

I cannot imagine this issue has not come up a 1000 times already, yet I seem
unable to find any site, blog or newsgroup that has a solution.

Am I missing something obvious or is this just not possible?

Thank you for any suggestion, idea or solution!
The solution to this is published under
http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=2939196&SiteID=1
But unfortunatly the problems just start when you implement this: Even if
you can change the filenam perfectly, "workflow start event" and alarms get
the old filename because those events get fired before ItemAdded or CheckedIn.
Regards
Tom
 
J

Johan Verrept

Hello Tom,

thank you for your response! You got farther that i did :)
In the end, I let the user enter a document code, then I query a list on
the SP site to determine where to save the file (It is impossible in Word to
set the filename and keep the path that it gets from SP). It is far from
perfect; but the best possible solution i could come up with. Ideally, it
should have been the other way around: the document lib should have
determined the document code.

Johan
 

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