How do I know if the user selected a SharePoint file in OpenFileDialog? - sharepoint

In an OpenFileDialog, the user can enter the address of the SharePoint site and select a document in the document library.
I need to provide check-in/check-out integration for SharePoint documents. Is there any way to determine if the file is stored in a SharePoint document library?
Thanks in advance!

After the dialog returns, you can check the value of the selected file. If there's a value, they probably selected a file. You can validate that a file was actually selected by attempting to open the file.
Start here: http://msdn.microsoft.com/en-us/library/system.windows.forms.openfiledialog.aspx

Related

SharePoint - Document Filtering (Tags/Metadata?)

I'm creating a SharePoint site which will be used to dynamically store and display documents on various pages, among other things. Is the following possible?
My view is to have one central Document Library which will include all files. Files with have 'tags' or 'metadata' attached to them. On pages, i will add a document library (or similar) webpart and then call only those documents with a certain tag/metadata.
For example.
Document Library ('Folder') - Contains ('Project Document.xls' and 'Training Document.ppt')
On 'index.html' i will add 'Folder' to the page, but i only want to display 'Project Document.xls' not 'Training Document.ppt'.
I'm aware that you can set up target audiences but that requires a lot of user management.
Thanks for any advice.
If I understand you correctly, this sounds like something you could accomplish using a filter. The name of the file is stored as a column. Try editing the web part on that page and edit the current view. That view will be cached for that page without changing the view across the site. If you want to be able to dynamically choose the document you display then one option is to add an HTML Form web part (which contains a text box and submit button), connect it to the doc library web part and filter the name column based on the HTML Form web part.

How do I search attached files stored in a MS Access 2010 database?

How do I search in MS Access (ver 2010) for data in files attached to records? If I do a "Find" and specify text I KNOW is in an attached txt file to a particular record, there are no hits. While if I have the same data in a Text Field or Memo field, Access finds it. I understood from one of the Access help screens I found that it is possible to search attachments from within Access, but I have not been able to do this yet.
BTW, I did try using the query tool and searching for text I knew was in the attachment, but it was not successful, although it did find the same text within a memo field in another record.
Thx,
jmb
I'm fairly certain that there is no mechanism in Access to find records based on text within a file attachment. A bit of web searching found an earlier question here and the responses seem to agree that there isn't.
One reference from Microsoft here says
By using attachments, you open documents and other non-image files in their parent programs, so from within Access, you can search and edit those files.
but I think that statement could be misinterpreted. I believe what they meant to say was that
"...from within Access you can open an attachment in its parent program and then work on it as usual (e.g., edit it, search it, print it, and so on)."
You can use file system object, open the file as string and search sequentially. That's as close as you'll get

Uploading documents from iManage into SharePoint 2010

I have a requirement from my client to upload documents from iManage/FileSite into SharePoint 2010. When they try to upload documents into the document library they would also like to have an option to get the documents from iManage, other than from the filesystem. Please let me know if there is any easy solution to achieve this. Custom coding is also fine with me.
Thanks in advance.
Use the SPSite Class's Files.Add to upload your file from your alternate source.
There's a complete walkthrough of uploading a local file on MSDN.
I have developed a solution for this that uses the IWL protocol, but this would assume the user has WorkSite/DeskSite installed on their computer, and are running WorkSite 8.5 or greater.
iwl:dms={SERVERNAME}&lib={LIBRARY}&num={DocumentID}&ver={DocumentVersion}&command=opencmd
I then developed a insert link option for a user to insert a WorkSite link and they provide the link text, document number and version.
Another alternative is to upload a NRL file, but again this assumes the user has WorkSite/DeskSite installed.
In my case I wanted to have a hyperlink column in the Sharepoint 2013 pointing to a document in my fileSite.
e.g link: iwl:dms=DEV85SERVER&lib=LIVE&num=25210&ver=1
e.g link description: Document test
I tried to create a hyperlink column but SharePoint didn't recognize my DMS link.
So I had to create a calculated column to make the DMS link works.
Create a column called "Document Link" as Single line of text.
Create another column called "Document Description" as Single line of text.
Create a third column called "Link" as a calculated column.
3.1 insert the following formula:
=IF([Document Link]="","To be inserted","<a href='"&[Document Link]&"'>"&[Document Description]&"</a>")
3.2 Change the type returned from this formula to "Number"
Done!
This is just an example. I hope it helps.

Download a document from SharePoint with version number

I need to be able to download a file out of SharePoint (to send externally) that has the version number in the file name.
Is there any way to do this without custom code? If not, how would I code this?
File in SharePoint -> Specifications.doc
Downloaded file -> Specifications V99.doc
I use SharePoint 2007, but I am also interested in a 2010 solution.
Don't think it's possible out of the box. As for manual implementation I see two ways:
1) If you can use some external application (or, for example, webpart or page) to do that, just get sharepoint file as binary stream and save it with the name you want.
2) If you need it to look like standard downloading, add a new custom button to document context menu (Ribbon in SP2010) and again do whatever you want with that document when user clicks the button.
This is about as close as I think we can come at this time:
http://spversionindocs.codeplex.com/
It allows you to have a version number field in your document that is automatically updated with the version number from sharepoint.

SharePoint Designer 2007 - link to a Document Library on a site from another site?

I am trying to create a link to an existing Shared Documents folder on another site. Both sites are on the same server.
Here are the steps I take to create a link to an existing Document Library:
I create a document library web page in Share Point 2007.
I open the document library (AllItems.ASPX) in Share Point Designer.
I delete the existing web part for the list.
In the Data Source Library, I click on "connect to another library" and create a connection to the other site.
I select the document library, click show data, select my rows and click Insert Multiple Item View.
I then configure the look for each field (hyperlinks, etc).
I edit the Filter for this view to show only the files that are for this location.
I click on Data View Properties and select "Enable sorting and filtering on columns (basic table layout only).
Basically I am trying to have a central location for all files for a site and sub sites. I want the sub sites to see the documents for their own location, be able to search through the files, etc.
The problems I am having are:
I am unable to open the links in a new window, even when I set the hyperlink to do so. I would prefer the file be opened in its native application (ie. A Word doc open in Word).
I am unable to show the file icon in the same way it shows up in the original document library.
When I go to the header and click ANY field, I can sort the field ascending or descending but I always get a message stating "This column type cannot be filtered".
Is there an easier way to do this? Or can someone tell me what I am doing wrong? I am new to using Share Point. Thanks for the help!
Some help for problem 1 (unable to open the links in a new window)...
I'm not sure if this will work using the Data View Web Part you have configured. However there is a technique for the List View Web Part. If you add a boolean field called OpenInNewWindow to your document library then documents that have this set to Yes will open in a new window. Try this out - it may work.
If you need to open PDF files in a new window, beware that there is an ActiveX control that will get in the way. Read this question for more information.

Resources