Open CAD files in Document Library

I would like to write a small program in Visual Studio 2010 that when a user clicks on a file or maybe selects 'Edit with
Program Name' in a SharePoint 2010 document library that it will download the file to the users desktop then open it up in the associated program. It will also need to check it out as well.
Would the OpenDocuments activeX be my best option here to develop with or is there a better method.

No code needed. You simply need to add a filetype and the appropriate mime handler in IIS.
Check out Add new file type in SharePoint. The screenshots are in french but you'll get the gist.
Jason Warren
@jaspnwarren
jasonwarren.ca
habaneroconsulting.com/Insights

Similar Messages

  • Unable to open html file in document library without saving first

    I've uploaded a bunch of HTML files from a DVD to a document library on our Sharepoint 2013 Enterprise server. When I try to open one of the html files it wants to save the file instead of opening it. If I choose to open the document library in Explorer
    I'm able to open the html files w/o issue.
    What's causing this? I know there is an option to set the file handing to permissive, but I'd rather not do that.

    Carl,
    See this link - http://sharepoint.stackexchange.com/questions/39020/how-do-i-prevent-sharepoint-from-asking-to-download-html-files-to-my-local-machi
    The allowed mime types are defined in theSPWebApplication.AllowedInlineDownloadedMimeTypes
    Property
    Here is small PowerShell utility function I use:
    function Add-SPAllowedInlineDownloadedMimeType{
    [CmdLetBinding()]
    param(
    [Parameter(Mandatory=$true, Position=0, ValueFromPipeLine=$true)]
    [Microsoft.SharePoint.PowerShell.SPWebApplicationPipeBind]$WebApplication,
    [Parameter(Mandatory=$true, Position=1)]
    [string]$MimeType
    process{
    $actualWebApp = $WebApplication.Read()
    if ($actualWebApp.AllowedInlineDownloadedMimeTypes -notcontains $mimetype)
    Write-Host "Adding MIME Type..."
    $actualWebApp.AllowedInlineDownloadedMimeTypes.Add($mimetype)
    $actualWebApp.Update()
    Write-Host "Done."
    } Else {
    Write-Host -ForegroundColor Green "MIME type is already added."
    And it can be used like this:
    Add-SPAllowedInlineDownloadedMimeType -WebApplication http://mywebapp -MimeType "text/html"
    Please 'propose as answer' if it helped you, also 'vote helpful' if you like this reply.

  • Error while opening .PDF files in document library sharepoint 2013

    Hi
    I am getting an error while opening a .pdf file,
    Please help me find the solution.
    Thanks
    Paru

    Launch IE -> Click on Gear (settings) -> Manage Add-ons -> Show: All Add-ons ->
    There are 2 Adobe Add-ons:
    Adobe PDF Reader  &  Adobe Acrobat Sharepoint Open Document
    Double-click both and be sure to click the button "ALLOW ON ALL SITES"
    (An * will appear in the field)
     http://crowdsupport.telstra.com.au/t5/T-Suite-Applications/There-was-an-error-opening-this-document-The-filename-directory/td-p/197425
    http://social.msdn.microsoft.com/Forums/sharepoint/en-US/ae2eea40-9fa6-46be-bca1-ac5eb5597d5e/sharepoint-2010-adobe-reader-error-opening-pdf-files?forum=sharepointgeneralprevious
    http://community.office365.com/en-us/f/154/t/46204.aspx?PageIndex=2
    disable the Mcafee Firewall Plug In.  This is after of course I ran superantispyware to remove some malware.  uninstalled and reinstalled the Adobe Reade
    https://forums.adobe.com/message/1776202?tstart=0

  • The way SharePoint open office documents will differ if the user try to open them from the document library directly, or if users try to open the document from the search result page.

    I have a document library where I have uploaded an excel sheet to it. Now If I click on the excel sheet directly from the document library page , I will get the following error ““The webpage cannot be displayed””. While if I do a search and I open the excel
    sheet from the search result page , it will open the excel sheet using the excel services inside the browser !!.
    So can anyone advice on this ?
    Also if I have a PowerPoint document , and I try to open it from the document library I will get the following error “The webpage cannot be displayed” , and the URL will be prefix with the following “ms-powerpoint:ofv|u|”. while if i do a search and i open
    the PowerPoint from the search result page i will be prompted to either open or save the document ? So why SharePoint is reacting totally different when trying to open document library items from the document library Or from the search result page?

    Hi,
    The behavior in the document library could be probably because of the Documents handling setting. Please try setting it to default behavior (Open in browser) as i hear from you that the default behavior is to open from browser.
    Thanks, Suneetha
    Currently I have set the following;-
    1. On the library advance setting :- I define  “Open in the client application”
    2. On the web application setting:- I define stricked for Browser File Handling
    And I have noted if I delete the browser cache and I access the document , then I will be prompted with the download dialog. but if I re-click on the same document I will be redirected to the
    The webpage cannot be displayed
    And the ms-powerpoint:ofv|u| will be added to the beginning of the URL. So could this be a caching problem ?

  • How to update managed metadata column for all file in document library using powershell

    Hi,
    How to update managed metadata column for all file in document library using powershell?
    Any help on it.
    Thanks & REgards
    Poomani Sankaran

    Hi TanPart,
    I have changed the code which you have give in order to get the files from SharePoint 2010 Foundation  Document Library.But i am getting below error in powershell.
    Property 'ListItemCollectionPosition' cannot be found on this object; make sure it exists and is settable.
    Could you tell me which is the issues in it?
    See the code below.
    $web = Get-SPWeb http://ntmoss2010:9090/Site
    $list = $web.Lists["DocLib"]
    $query = New-Object Microsoft.SharePoint.SPQuery
    $query.ViewAttributes = "Scope='Recursive'";
    $query.RowLimit = 2000
    $caml = '<Where><Contains><FieldRef Name="Title" /><Value Type="Text">Process Documents/Delivery</Value></Contains></Where>' +
            '<OrderBy Override="TRUE"><FieldRef Name="ID"/></OrderBy>'
    $query.Query = $caml
    do
        $listItems = $list.GetItems($query)
        $spQuery.ListItemCollectionPosition = $listItems.ListItemCollectionPosition
        foreach($item in $listItems)
            #Cast to SPListItem to avoid ambiguous overload error
            $spItem = [Microsoft.SharePoint.SPListItem]$item;
            Write-Host $spItem.Title       
    while ($spQuery.ListItemCollectionPosition -ne $null)
    Thanks & Regards
    Poomani Sankaran

  • Drag and drop the file from document library to desktop in sharepoint 2013

    can we drag and drp the file from document library to desktop in sharepoint 2013
    Blitz

    We are using third party tool called PageLight for
    SharePoint Outlook Integration which provides drag and drop functionality of emails from Outlook to SharePoint.  Other features includes
    Save Outlook emails to SharePoint and also moving files/folders from file share.
    Thanks
    Alfred

  • Unable to add aspx file to document library using REST and JSOM in SharePoint Hosted App

    Hi,
    I am unable to add an aspx file to document library.  I was actually trying to create a WIKI page and upload to Pages library but that wasn't working so I tried simple document library.  It keeps failing with Access Denied error.  I have checked
    the blocked types and aspx is not included.  I can upload it directly from the browser so that shouldn't be the case.  I have read that it can be achieved with CSOM but I need this to work with a SharePoint Hosted App.  Here is my JSOM:
    factory = new SP.ProxyWebRequestExecutorFactory(appweburl);
        context.set_webRequestExecutorFactory(factory);
        appContextSite = new SP.AppContextSite(context, hostweburl);
        oWeb = appContextSite.get_web();
        oList = oWeb.get_lists().getByTitle('Documents');
        fileCreateInfo = new SP.FileCreationInformation();
        fileCreateInfo.set_url("mywiki.aspx");
        fileCreateInfo.set_content(new SP.Base64EncodedByteArray());
        fileContent = "<%@ Page Inherits=\"Microsoft.SharePoint.Publishing.TemplateRedirectionPage,Microsoft.SharePoint.Publishing,Version=15.0.0.0,Culture=neutral,PublicKeyToken=71e9bce111e9429c\" %> <%@ Reference VirtualPath=\"~TemplatePageUrl\"
    %> <%@ Reference VirtualPath=\"~masterurl/custom.master\" %>";
        for (var i = 0; i < fileContent.length; i++) {
            fileCreateInfo.get_content().append(fileContent.charCodeAt(i));
        newFile = oList.get_rootFolder().get_files().add(fileCreateInfo);
        context.load(newFile);
        context.executeQueryAsync(function () {
            alert('yo');
        }, function (sender, args) {
            alert(args.get_message() + '\n' + args.get_stackTrace());
    If I change the file extension to "txt", it works.  Same with REST implementation, it works with "txt" but fails with "aspx".  Maybe what I am trying to do will not work using JSOM or REST.  Any suggestions?  Your
    help is always appreciated.
    Regards,
    kashif

    Your code works fine in both my on-premises and SharePoint Online. I have given the app full control, so I suspect this is a permissions issue. I would check your permissions on your appmanifest. Must be something to do with publishing permissions. Try
    giving full control and work the permissions down.
    Blog | SharePoint Field Notes Dev Tools |
    SPFastDeploy | SPRemoteAPIExplorer

  • Download files from document library in zip file using javascript

    Hi,
    I am developing SharePoint Hosted App which needs to download all the files in the document libraries of SharePoint site in a zip folder where in that zip file each document library should be a folder, in that folder the files of that document library will
    be shown. Currently I am display all the document library in a table with check boxes as shown in the below figure. Now when user selects the check boxes and click on download button, the selected document libraries along with the files should be downloaded
    in a zip folder. This should be achieved through javascript. Can anyone share me the code to solve this problem.
    Thanks & Regards,
    Kishore
    Kishore

    You can use
    zip.js, but the best way - implement your solution on the server-side.
    [custom.development]

  • Is it possible Encrypt files in document library after uploading OOB

    Is it possible Encrypt files in document library after uploading using  OOB?
    if so please share how the above can be achieved.
    V Jean

    hi
    there is no easy OTB mechanism for that. The most closer OTB functionality is Rights Management Services (see
    e.g. Plan Information Rights Management), which seems like can be used for configuring policy for data encryption, like mentioned in the following forum thread:
    How to Encrypt SharePoint data. Also you may use the following methods to make file upload safer:
    1. use https instead of http
    2. use Sharepoint rights system in order to restrict access to the uploaded documents to only allowed persons (e.g. you may use unique permissions on the doclib level or on file level)
    3. if encryption is crucial and you don't want to enable it to all doclibs via RMS, you may use custom solution via event receivers: during file upload it may encypt it by using some standard encryption algorithm (see
    Which built-in .NET cryptography algorithm is the most secure).
    Blog - http://sadomovalex.blogspot.com
    Dynamic CAML queries via C# - http://camlex.codeplex.com

  • How external users can upload files in document library hosted in onpremise SharePoint?

    Hi all,
    We have setup a document library(DL) in SharePoint site hosed on-premise with no direct access from public zone/internet being an intranet solution. We have some external users who need to upload some files that needs to go in this document
    library. These files are quite confidential in nature so security is a prime requirement. Following are the couple of options I have in mind:
    1. External users upload their file in their designated folder to secure FTP using their own credential set. And also there is a background process (kind of directory watcher) that keep looking at the all the folders
    and moves the files to document library
    2. We host a single page application which has One time password (OTP) kind of feature. External user comes to the secure site to specify Vendor team name and mobile number. OTP is generated and user is asked to specify the password along with file
    they would like to upload. This page also maps the vendor name with respective folder in DL and moves the files to SharePoint there on the fly.
    Pls. share your opinion about these approaches. Also welcome your thoughts if there is any other better option.
    Thanks.

    Hi,
    I agree with the Margriet, the first option is simple and safe, the users could not access the document library directly.
    For security, it is an importance for users not access the document library directly, it will reduce the risk of the documents in the library.
    Thanks,
    Jason
    Forum Support
    Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Subscriber Support, contact
    [email protected]
    Jason Guo
    TechNet Community Support

  • Need to open CAD files - SAP Visual Enterprise Generator

    Hi Experts,
    We have got a requirement where they should be able to open CAD files in SAP (i.e SAP ECC6.0 EHP6).
    Can this is acheived with SAP Visual Enterprise Generator ?
    If yes, kindly suggest if it comes as an ABAP Add-on that can be deployed or a Business Function which can be activated to enable this functionality ?
    Many Thanks in Advance !!!
    Regards,
    Srikanth G

    Hi Fergal,
    Thanks for the quick response..
    As per the Installation Guide we understand that SAP VEG is another standalone component that has to be installed(correct me if am wrong) in another WIN machine. But we are actually looking out for something like the below where in one of our IDES system we are able to view CAD files stored in DMS in a SAP Transaction (cv04n):
    In SPRO we could see some options for VEG in our IDES system.
    We need the same in our actual project ECC system
    The above can be achieved only after SAP VEG 7.1 installation only ? Or is it something which is already a part of ECC6.0 EHP6 that needs to be activated?
    Thanks !!!
    Regards,
    Srikanth

  • Can't open Acrobat pdf files in document library - SBS 2011

    I've uploaded some Acrobat PDF files to a document library in the companyweb (SharePoint 2010 Foundation website) on SBS 2011. But if I click on one of them in the standard view, acrobat opens and displays a message “The URL you have provided could not be
    reached. Please verify that the URL is correct and that the network location is reachable.” I'm using Acrobat Reader XI 11.0.2 and Internet Explorer 10.
    I have tried a few suggested solutions, eg to edit the docicon.xml file to include <Mapping Key="pdf" Value="AdobePDF.png" OpenControl="AdobeAcrobat.OpenDocuments"/>, check that the WebClient service is running, and
    Use Remote Interfaces permission is set on the SharePoint site. But no luck.
    I don't know if this is a problem with SBS 2011, or Acrobat, or Internet Explorer. Interestingly the pdf opens OK in Chrome. It looks like it is trying to edit the document instead of open it in the acrobat reader.
    Anyone know of a solution?

    I have found one possible solution. In my case the site was brought into Sharepoint Foundation 2010 as a migrated site from a previous SBS installation. 
    The site was imported as http://servername and the IIS site had a host header with companyweb so that users could browse to it, and all references to the site were as http://companyweb
    All my attempts to open the PDFs were using the http://companyweb URL.
    I was researching the issue and had gone through everything, but one thing got me thinking when some sites suggested that I look at the permissive or strict browser file open settings. I looked at the web application and it was set to http://servername in
    the Central Administration site. I thought hmm let's try opening the Adobe PDF docs with that URL instead, and it worked!
    So I changed the web application URL to http://companyweb and tried again and hey presto it's now working.
    I really hope this helps someone, it took me a good couple of hours of my day researching to find the solution here.
    Some extra info: we are using Adobe Reader 11.0.6 with IE11. Testing with Firefox worked, but that opens the document by downloading it locally and then using Adobe Reader. fix The above actually resolves the problem, it's nothing to do with permissive or strict
    file open settings, I set the SP site back to strict and PDFs still open fine. 

  • How to read excel file in document library and store excel content in sql table

    Hello,
    Can anyone help me how to read the excel file present in document library and store the content inside excel into sql table?
    Please let me know the ways to acheive this. Feel free to give your suggestions.
    Thanks,
    Cool Developer

    Hi!
    this code i have written becuase i donot find any soltions on net for this , u can try with this . :)
    System.Data.OleDb.
    OleDbConnection ExcelConnection = null;
    FileMode fileMode;
    string filePath = ConfigurationManager.AppSettings["TempLoaction"] + "\\" + fileName;
    using (SPSite _site = new SPSite(SPContext.Current.Web.Url))
    using (SPWeb _web = _site.OpenWeb())
    string docLibrary = ConfigurationManager.AppSettings["DocumentLibrary"];
    SPFile _file = _web.GetFile("/" + docLibrary + "/" + fileName);
    fileMode =
    FileMode.Create;
    byte[] byteArray = _file.OpenBinary();
    MemoryStream dataStream = new MemoryStream(byteArray);
    Stream stream = dataStream;
    using (FileStream fs = File.Open(filePath, fileMode))
    byte[] buffer = new byte[4096];
    int bytesRead;
    while ((bytesRead = stream.Read(buffer, 0, buffer.Length)) != 0)
    fs.Write(buffer, 0, bytesRead);
    fs.Close();
    //Create the Connection String
    try
    string ConnectionString = @"Provider=Microsoft.Jet.OLEDB.4.0;
    Data Source ='"
    + filePath + "'; Extended Properties=Excel 5.0";
    //Create the connection
    ExcelConnection =
    new System.Data.OleDb.OleDbConnection(ConnectionString);
    //create a string for the query
    string ExcelQuery;
    //Sheet1 is the sheet name
    //create the query:
    //read columns from the Excel file
    ExcelQuery =
    "Select * from [Sheet1$]"; // from Sheet1";
    //use "Select * ... " to select the entire sheet
    //create the command
    System.Data.OleDb.
    OleDbCommand ExcelCommand = new System.Data.OleDb.OleDbCommand(ExcelQuery, ExcelConnection);
    //Open the connection
    ExcelConnection.Open();
    //Create a reader
    System.Data.OleDb.
    OleDbDataReader ExcelReader;
    ExcelReader = ExcelCommand.ExecuteReader();
    //For each row after the first
    while (ExcelReader.Read())
    thanks,
    kshitij

  • Error while editing file from document library

    Dear All,
               I have some users in one of the SharePoint site with contribution access . When they try to open and edit the excel document they are facing error as below.Can any one help me how can I over come from this issue
    Thanks,
    Quality Communication Provides
    Quality Work.

    Hi siddiaqli,
    When the user edit the excel file, whether other users also edit it.
    Please try to enable Check-out/Check-in in the library, then test again, compare the result.
    You can enable Check Out/In as Library settings->Versioning settings->Require Check out.
    In addition, please create a new excel file in the library, and test again, compare the result.
    Please create a new library, and create a new excel file in the new library, test again, compare the result.
    Thanks,
    Wendy
    TechNet Community Support
    Please remember to mark the replies as answers if they help, and unmark the answers if they provide no help. If you have feedback for TechNet Support, contact
    [email protected]

  • Create excel file in document library from the data in datatable

    Hi ,
    I want to generate files dynamically and have then saved to my documetn library instead of  some location on the  harddisk.
    I want to generate and excel file  which will read data from the sharepoint list.
    Form that data excel will be genereated in the code ,and i want the generated excel directly available in the  document library.
    I could use open xml of excel itneroperablity for the excel file generation.
    How can i do that.

    Hi,
    According to your description, you might want to gather data from a SharePoint list as an excel file and upload it to a Document Library.
    As you said, you can generate an Excel file using the Open XML SDK, I will provide some information about how to get data from SharePoint list and how to upload files
    to a Document Library.
    About the retrieving data from a SharePoint list, we can use SharePoint Object Model:
    SharePoint Object Model -
    SPListItem class
    http://msdn.microsoft.com/en-us/library/microsoft.sharepoint.splistitem.aspx 
    Add, Update and Delete List Items Programmatically in SharePoint
    http://www.mindfiresolutions.com/Add-Update-and-Delete-List-Items-Programmatically-in-Sharepoint-372.php 
    About
    How to: Upload a File to a SharePoint Site from a Local Folder:
    https://msdn.microsoft.com/en-us/library/office/ms454491(v=office.14).aspx
    Thanks
    Patrick Liang
    Forum Support
    Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Subscriber Support,
    contact [email protected]
    Patrick Liang
    TechNet Community Support

Maybe you are looking for

  • Sprite collision

    im using two (transparent background) .png images as sprites. Both are of same width and height. And both have the same starting point. But one image is on lower half of one sprite, and the other image is on upper half. Non-transparent (visible) part

  • Events not appearing across event-spanning days in ip 3gs

    Can you help pls I have a 3gs syncing via excange server. seems generally ok but events spanning several days do not appear in the iphone - just the start entry (eg in an event spanning 5 days, just appears in iphone on first day). The full event doe

  • Hi all , problem in copy control from billing type f2 to debit and credit

    hi all, i have a problem in copy control from billing type f2 to debit and credit memos, could any body advise me the procedure for this issue , thanks , sre

  • Help with 4506 802.1x Port Based Authentication (Wired)

    Hi all, I'm trying to configure wired 802.1x security on a Catalyst 4506 IOS 12.1.19(EW), using Microsoft IAS (Microsoft's RADIUS), and Windows 2000 SP4 clients. I've followed the procedures in the 4506 Software configuration guide and they seem to b

  • File with exclamation mark and cannot connect

    My ipod stopped working. I had a low battery so I charged it. Now when I try to turn it on, it just churns and churns and then the file with exclamation mark comes on the screen. Also, when I try to connect it to my computer, the computer doesn't rec