I have seen in an article that document template is stored in the Forms folder of the library.Where is the physical path of Forms Library?or in content database?

I have created a document template through following code

                web.AllowUnsafeUpdates = true;
                SPDocumentLibrary lib = (SPDocumentLibrary)web.Lists["DocumentLibraryInstance"];
                string urlStr = @"Lists/DocumentLibraryInstance/Forms/anish.doc";
                lib.DocumentTemplateUrl = urlStr;

Is the file extension correct?

  • Maybe your list "DocumentLibraryInstance" is not a document library.
    – user20072
    Oct 11, 2013 at 7:38

1 Answer 1


Checkout the answer given here

Set the Document Template of a Document Library programmatically


For word Document template extension will be .dotx

  • The two links gave me good idea about document templates.But i am getting an error "new document requires a microsoft sharepoint foundation-compatible" when click the ribbon item new document.
    – anish
    Oct 11, 2013 at 9:06
  • Check with 1.Compatible Browser Version 2. Element 2: Compatible Office Version 3. Element 3: Microsoft SharePoint Foundation Support in Office. refer this one: codeproject.com/Tips/440704/…
    – Anuja
    Oct 11, 2013 at 9:14
  • I am using office 2007
    – anish
    Oct 11, 2013 at 9:23
  • Try to install and configure Office Web Applications on the server, You will get support fix info here: support.microsoft.com/kb/833714
    – Anuja
    Oct 11, 2013 at 9:31

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.