New document gets wrong content type - sharepoint

Within a site collection "x" I have got a document library which contains multiple content types. Each content type is managed at site collection level and has a .dotx template file assigned to it.
The .dotx file should be adjustable within SharePoint so it is stored within a document library in de root site collection. The template file has got the content type Document assigned to it.
When I want to create a new document in the document library in site collection "x" I click on New and select the content type for my document.
Let's say I clicked content type "Document A". Word opens and in the document information panel I see the correct content type "Document A" and the columns associated with it. When I save my document all goes well.
Now I want to create a document with content type "Document B". I click on New and select content type "Document B". When Word opens and I look in my document information panel I see that the content type again is "Document A". The columns in my document information panel are also the columns assiocated with content type "Document A".
It doesn't mather which content type I pick, every document gets content type "Document A" assigned to it.
Anyone experienced the same behaviour before and knows how to fix this issue?

Document templates will carry a lot of xml data with them and sometimes it won't get overwritten. You can see them when using word:
File --> Info: Inspect Document --> Check for issues: Inspect Document
You will see what data this document carries within.
And you can delete this information also in this view.
Remove that data and upload template for the content type again.

Save the dotx file as your desired content type, then your new document will be the same content type as the dotx file. So you wll need to add your content types to the library where you are storing your dotx template files.

Related

Content Type Not Updated docx,xlsx,pptx in SharePoint

SharePoint library items has document has (.docx, .xlsx, .pptx) extension and item associated with custom content type(Blank word document, Document). When user tries to change custom content type to OOTB content type(Document). It’s not updating even there is no error.
Steps to Reproduce:
1.Create a custom content type that parent as "Document".
2.Associate the content type into the document library and add "content types" to All documents view.
3.When library items has document has (.docx,.xlsx,.pptx) extension and item associated with custom content type.
4.Now try to change custom content type to OOTB "Document" content type and vice-versa.
5.It’s not updating even there is no error.
Please help on this i faced this issue only in (.docx,.xlsx,.pptx) extensions.
Thanks,
Rajendhiran M
Which SharePoint version are you using? May be you can monitor/check SPLogs while updating the content type.

Share point Workflow 2010 Document Creation from Template File

We have created a workflow on a List that creates a new document in a specific document library based on a template file. We would like to add automation so that a user could choose the template file that they would like to use when "running" the workflow.
We have searched around and found many tutorials on document creation, but none where you selected the template you wanted to use.
Any help?
You can do that with Content type. You can link a template to a content type. So Create X content type on your list (X = number of your template file) and link template file to content type.
to sum up :
Enable content type on your document Lib
Create a Content type on your list
Upload and Link template file to your content type
When create new document, choose your content type to change the template file

Access List items in hidden "Forms" folder using Lists.GetListItems

Is it possible to access the list items in the (hidden) "Forms" subfolder of a document library using the Lists.GetListItems web service method? I need to set the content type of uploaded document templates using Lists.UpdateListItems, otherwise, document created from these templates will have the 'Document' content type and not the content type the template had been assigned to.
Lists.UpdateListItems works in subfolders of the "Forms"' folder, but I need the ows_UniqueId of the list item that represents the uploaded file, and I can only get it using List.GetListItems.
Is there maybe another method of uploading files to SharePoint document libraries, in which you can set the content type?
List.GetListItems expects you to pass it a view, if you don't it uses the defaults view. So what you need to do is create a seperate view which lists all items, and make this view list flat (not listing by subfolder).
Then query against this view.
Does this suck? Yes. Does SharePoint suck? I'll let you answer that question. I didn't write sharepoint, just telling you the way it is.
I don't understand the relationship between the content type of an uploaded document in a document library and the elements in the Forms subfolder.
What I'd try:
- Use Copy Web Service, method CopyIntoItems to upload the file, setting some properties, including the content type.
- Use Lists.GetListItems, with a CAM query specifying the file name and asking for ows_UniqueID property

How to save a word template for a content type without filling in required fields

I have a content type that has required fields. I have associated Word document with the content type as a template. I now want to edit the Word template, but word won't allow me to save the template without filling in the required fields. However, if I fill in the required fields and save the document, then those fields get populated with my values when you create a new document. This isn't good because I want the fields to be blank when a new document is created - I want the users to be forced to fill in those values.
I can update the templace by updating the colums and making them optional, editing the word template, saving the template & then changing the columns back to required. This is a PITA - there's got to be a better way, does anyone know what it is?
I've been using this work around: When I edit the template (ie go to the content type settings --> Advanced settings --> Edit Template), I make my changes and save the file locally. Then, on the same page that I clicked the "Edit Template" link, I upload the copy that I saved locally. Saving it locally avoids the validation that happens when you try to save it back to SharePoint. But the validation still gets applied to any new documents of that content type. So no need to toggle the settings off & on! :)
Have you tried saving the document as a normal document content type, making the changes, saving it, then moving back over the top of where the old version of the template was?
The only solution I've found is to modify document templates on library level. Just upload a new document template for the required content type.
However, this will not work if you'd like to re-use one and same content type across different document libraries.

SharePoint custom content feature with Word Quick Parts and Document Information Panel

I am creating a custom content type feature for MOSS that will also include a Word 2007 document as the document template. The same Word document will also have a Document Information Panel (DIP) and Quick Parts for all the fields in the content type.
The problem is that when my feature is deployed the Word document's Quick Parts no longer seem bound to the content type's columns in the Document Library. For example, if you:
Type a value into the Quick Part
Save the Word document to the document library
Look at the documents properties;
The value just typed is not listed. However if you use the DIP to specify the value (instead of the quick part) and then save it, it does get saved as metadata.
The "Document Information Panel Settings" screen for my content type is acting as if there is no InfoPath template. Sure enough if I re-upload (or create a new) InfoPath template, then the above problem goes away.
How do I get this to work in my feature without having to do the manual step described above?
It may be possible to define a custom template for the DIP and deploy that to the site, setting the content type to link to that template.
I found a solution in a blog, but you have to use InfoPath... Here is the link:
Using SharePoint Metadata in Word Documents – The Lookup Column
http://vspug.com/maartene/2009/03/13/using-sharepoint-metadata-in-word-documents-the-lookup-column-issue/

Resources