Sharepoint Forum

Ask Question   UnAnswered
Home » Forum » Sharepoint       RSS Feeds

Replace default template on "NEW" button of Shared Document Library

  Asked By: Travon    Date: Jul 02    Category: Sharepoint    Views: 1939

This code works really well - I found it in a prior post, but it
does not do what I need it to do.

> <A href="JavaScript:CreateNewDoc();">New Document</A>
> <script type="Text/JavaScript" language="JavaScript">
> function CreateNewDoc()
> {
> var doclib = makeAbsUrl("/Shared Documents");
> var strTemplate = doclib + "/Forms/template.doc";
> var strSaveLocation = doclib;
> var strProgID = "SharePoint.OpenDocuments";
> createNewDocumentWithProgID(strTemplate, strSaveLocation,
> strProgID, false);
> }
> </script>

I am trying to replace the template that is called when a user
selects the "New" button on a document library. In SharePoint 2003
you could modify the allitems.aspx file when the call to
createNewDocumentWithProgID was called. I don't see a call to this
function within SharePoint 2007 doc lib AllItems.aspx.

So where can I reset the "template.dot" to
say "myCustomTemplate.dot"?



No Answers Found. Be the First, To Post Answer.