MOSS Forum

Ask Question   UnAnswered
Home » Forum » MOSS       RSS Feeds

URL to "new doc" in Doc Library

  Asked By: Loren    Date: Feb 05    Category: MOSS    Views: 2583

Does anyone know how I can put a link into a custom list (MOSS) which will open
up the default template in a DocLib in the same site collection and pass one of
the columns of the list as a parameter to the template application, say Word?

Or point me to blogs about this? I don't even know how to Google this?



4 Answers Found

Answer #1    Answered By: Beatrice Serrano     Answered On: Feb 05

The "URL" in this case is going to be a javascript action - you can get
the specifics by doing a View Source on the document library  page and
Searching for "New" - the one you want is going to show up in a
<ie:menuitem> tag. As for getting a column from the list, those should
be available in the Document Information Panel when you open using the

Answer #2    Answered By: Maya Lewis     Answered On: Feb 05

Specifically, this is the createNewDocumentWithProgID function, and the call
looks like this:


'SharePoint.OpenDocuments', false)

Passing the parameter  from the first list  item will be tricky in this case,
but my suggestion would be to append it to the URL in the first parameter of
the function call. Then, like Bryan said, you may be able to get it in the
DIP... though I'm not sure about that part. You might have to tap into the
ActiveX control that gets created by the create function.

Creating the actual link  in another list should be a matter of concatenating
the big ugly JavaScript call and the appropriate field from within the same
list item. To display it as a link, you'll need either (a) a custom  display
form (created, say, in SharePoint Designer), or (b) an extra bit of
JavaScript that converts the rendered field into a hyperlink after the page
loads. This script can be added via a Content Editor Web Part on the List
View page.

Does that help, or did I just make a huge new mess?

Answer #3    Answered By: Paola Mcmahon     Answered On: Feb 05

You can get the columns  via DIP but you won't get column values other
than the one for the current item (blank in this case) without custom
code of some sort AFAIK.

Answer #4    Answered By: Justin Mckee     Answered On: Feb 05

Now it'll take me 1-2 weeks of diddling to figure it out.

Didn't find what you were looking for? Find more on URL to "new doc" in Doc Library Or get search suggestion and latest updates.