Sign in with Microsoft
Sign in or create an account.
Hello,
Select a different account.
You have multiple accounts
Choose the account you want to sign in with.

摘要

假設文件庫已 Microsoft SharePoint 伺服器 2010年有多個內容的類型。 當您第一次將新的檔案儲存到文件庫時,會提示您選取檔案的內容型別。

解決方案

若要解決這個問題,請套用下列的 hotfix 更新:

  • 2536591 SharePoint 基礎 2010 hotfix 套件 (sts-x-none.msp) 的描述: 2011 年 6 月 30,

  • 2544019 SharePoint 伺服器 2010年的 hotfix package(dlc-x-none.msp) 的描述: 2011 年 6 月 28,

套用這些 hotfix 套件之後,設定為True SPList.ForceDefaultContentType文件庫。 若要這樣做,請使用下列的 PowerShell 命令:

PS > $web = Get-SPWeb -Identity http://SPServerPS > $list = $web.GetList("/Documents")PS > $list.ForceDefaultContentType = $truePS > $list.Update()

注意Hotfix 套件SPList物件中加入新的ForceDefaultContentType屬性。 屬性的預設值為false,並可以只變更屬性以程式設計的方式。

  • 如果ForceDefaultContentType屬性設為false。 系統會提示您選取檔案的內容型別,當您儲存透過 Office 2010 SharePoint 文件庫的用戶端會建立檔案。 從程式設計的觀點來看, Lists.GetListContentTypes的 web 服務,請傳回SPList.ContentTypes中的所有內容的型別集合.集合

  • 如果 [ ForceDefaultContentType ] 屬性設定為true時,會新增為新的項目檔案會指定清單的預設內容類型。 因此,您會不再提示選取內容類型。  從程式設計的觀點來看, Lists.GetListContentTypes的 web 服務會傳回第一個內容類型也就是在SPList.ContentTypes中清單的預設內容類型集合。

狀態

Microsoft 已確認本篇文章<適用於>一節所列之 Microsoft 產品確實有上述問題。

Need more help?

Want more options?

探索訂閱權益、瀏覽訓練課程、瞭解如何保護您的裝置等等。

社群可協助您詢問並回答問題、提供意見反應,以及聆聽來自具有豐富知識的專家意見。

Was this information helpful?

How satisfied are you with the translation quality?
What affected your experience?
By pressing submit, your feedback will be used to improve Microsoft products and services. Your IT admin will be able to collect this data. Privacy Statement.

Thank you for your feedback!

×