SharePoint Diva

March 18, 2009

Do you use ShareVis?

Filed under: Uncategorized — sharepointdiva @ 8:36 pm
Tags:

I’m forming a user discussion group for ShareVis. Please come join if you use ShareVis.

ShareVis Discussion
Visit this group

December 24, 2008

Setting the Document Library “New Folder” default to False

Filed under: Uncategorized — sharepointdiva @ 4:28 pm

How to make the default of ‘Display “New Folder” command on the New menu’ equal to No instead of Yes.

Modify the DocumentLibrary.xml in the 12 Hive (C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\TEMPLATE\FEATURES\DocumentLibrary\ListTemplates)

<?xml version=”1.0″ encoding=”utf-8″?>

<Elements xmlns=”http://schemas.microsoft.com/sharepoint/”>

<ListTemplate

Name=”doclib”

Type=”101″

BaseType=”1″

OnQuickLaunch=”TRUE”

    FolderCreation=”FALSE”

SecurityBits=”11″

Sequence=”110″

DisplayName=”$Resources:core,doclibList;”

Description=”$Resources:core,doclibList_Desc;”

Image=”/_layouts/images/itdl.gif”

DocumentTemplate=”101″/>

</Elements>

Perform an iisreset to activate.

November 5, 2008

Replacing Multiple Hyperlink Values in a List

Filed under: Uncategorized — sharepointdiva @ 8:13 pm

I rather embarrassed of this solution, but I’m hoping that if I post what I’m doing some else out there will know of a better way.

 
 

I have a long list with hyperlinks. I reuse this list in multiple locations and need to change the location name in the URL. I export the list to a spreadsheet and launch the Visual Basic editor. I then run the following code:

 
 

Sub ReplaceHyperlinkAdresses()

Dim hypLink As Hyperlink

Dim ws As Worksheet

 

For Each ws In Worksheets

For Each hypLink In ws.Hyperlinks

If hypLink.Address Like “http://server/sites/department/Documents/Forms/OLDLOCATION.aspx*” Then

hypLink.Address = _

Replace(hypLink.Address, “http://server/sites/department/Documents/Forms/OLDLOCATION.aspx“, “http://server/sites/department/Documents/Forms/NEWLOCATION.aspx“)

End If

Next hypLink

Next ws

End Sub

 
 

Afterwards, I copy and paste the column with the hyperlinks back into my list using the datasheet view. It works, but I feel like there should be a better way to update a list of hyperlinks in a SharePoint list.

 
 

Blog at WordPress.com.