MOSS Forum

Ask Question   UnAnswered
Home » Forum » MOSS       RSS Feeds

Which is the best way to do this?

  Asked By: Aurelio    Date: Aug 22    Category: MOSS    Views: 916

I have a windows form that allows an employee to set up a new product.
The form creates a new WSS site (using a custom site definition) and
creates a document library called "Reports."

The form also includes a section where the employee can select what
reports he wants to see (Plant, Efficieny, Margin, etc). When a user
selects one of these, I want to create a web part page called "Plant"
(for example) and store it in the "Reports" doc lib. The web part page
should be pre-populated with several custom webparts.

I do not know how to accomplish the creation of the new webpart page.
Do I create a custom webpart page template or should I add the webparts
via the object model? Should I store the Plant.aspx, Efficiency.aspx
pages on the File Server or on a WSS site? Or is there something way



1 Answer Found

Answer #1    Answered By: Nina Banks     Answered On: Aug 22

Ok, I've simplified it down a bit. Now I need to move documents
between document  libraries programmatically. Here's the code I'm

Dim site  As SPSite = SPControl.GetContextSite(Context)
Dim web  As SPWeb = site.AllWebs("Site_Name")
Dim files As SPFileCollection = web.GetFolder
Dim i As Integer

For i = 0 To files.Count - 1

If files(i).CheckInComment = "Complete" Then

files(i).CopyTo("Destination_DocLibrary/" & files(i).Name)

End If

Next i

I can't figure out what to put for "Destination_DocLibrary/"...The
destination doc  lib is on a subsite of the Main doc lib.

Didn't find what you were looking for? Find more on Which is the best way to do this? Or get search suggestion and latest updates.