How to add Custom Content Type Fields to Template in a SharePoint Add-In - sharepoint

I'm trying to recreate this functionality in a SharePoint add-in using Visual Studio 2015. I'm stuck at customizing the MS Word template to include metadata fields (DevNumber, DevOpen, etc). If I create a content type in SharePoint itself, I get a template that includes my fields as custom proprieties. How can I get similar functionality in a SharePoint add-in?

Run the app, then create a document using the default template.dotx. Update the document how you want the template to look, including adding property fields, then save the file as template.dotx in the appropriate folder - something like: https://myAppWeb/MyProjects/Lists/MyList/Forms

Related

Use predefined Office documents in Web Add-in

I have a requirement to create Web Add-in for Power Point that will change both document content and meta data. Let's call these changes templates.
The Add-in task pane will contain a drop down list for all possible templates.
When the user choose one of them and click apply button, selected template will be applied.
Each template has to add a header, a footer and custom properties to the document.
As Office.js API is not supporting custom properties manipulation, I'm thinking about defining all templates, as PPT documents with proper headers, footers and custom properties, manually. When a user decides to apply a specific template, I will copy the content of the current PPT document to selected template (existing PPT document) and continue working on the template behind the scenes.
Giving this scenario, is it possible to:
Have some predefined PPT documents as templates in an Office Web Add-in
Copy the content of PPT document to a another one and continue working on the second?
good question.. here is some guidance for you:
Unfortunately, this is not possible to implement as a Web Add-In in PPT today.
The PPT JS API is still not as rich as in Word or Excel.
I recommend you to create a VSTO Add-In for this scenario.
Please add this request to our user voice channel.
Thanks!

Sharepoint 2010 add,edit,delete forms replace to custome visual web parts

It`s possible in sharepoint 2010, will set up a list of custom data source and then adapt new input forms from visual web parts which will replace the existing add, edit and delete forms?
if it is possible, then how?
Here is an article on MSDN that describes how to use InfoPath to customise the Display, Edit and New forms for external list data (business connectivity services).
Just like in SharePoint 2007 you can change the association of the New, Edit and Display forms using SharePoint Designer in SharePoint 2010. You can create new ASPX pages, or use InfoPath forms as per the above. These ASPX pages can contain the functionality you want directly, or host visual web parts with the right permissions.
Here is an article that describes how to change the associated forms for a list with SharePoint Designer. I would recommend creating new pages and associating the list to those rather than trying to update the existing pages. This avoids any problems if the out of the box files are updated by a service pack / hotfix etc, and also allows you to revert to the out of the box forms if needed.

Custom Edit for Sharepoint document library

I have a document library with 2 different Content Types. I need to create custom edit form for editing document properties, I need different custom edit forms for content types.. So I followed the instructions SPD support site to create the edit form using Sharepoint designer. I have done this of several lists and it all works perfectly.
For the document library when I try to attach the custom form to the library I don't see the "Content type specific forms" drop down to choose the content type to attach the custom edit form.
How can this be done?
I'm using MOSS 2007
If using 3rd party components is an option, you can use PowerForms to easily customize the edit forms for each content type without using SP designer

How do I get CAML for a custom content type

I am trying to get the CAML for a custom content type that I am creating. What I am really doing is creating the content type in Visual Studio 2010 via CAML and then deploying that content type to my sandbox using the new deploy features in VS 2010. At that point, I am modifying the content type using the SharePoint interface (i.e changing advanced settings, adding columns, etc) since it is easy to do via the web interface. What I would like to do, is after I have made my changed, update my CAML in Visual Studio to match my changes.
I want to do this because I am creating custom fields and content types for my project and want to create a solution with these customizations. Since there doesn't seem to be a way to do this (create custom fields and content types) as a solution using SharePoint without putting them into a list, I am using Visual Studio and CAML for this. I also want to use Visual Studio and CAML so that I can put these CAML xml files in source control so that I can version my custom fields and custom types.
I have tried using tools like http://spcamlviewer.codeplex.com/ but that doesn't seem to work with SP 2010.
Does anyone have any suggestions? I wish Visual Studio would just have an update from SP button after I have deployed my solution and made changes on the server so it would sync VS from the SP server.
SharePoint Manager 2010

Infopath Form Template Conflict

We have a bunch of story libraries in Sharepoint 2003 for all of our different projects. We created a nice Stories Library with a bunch of useful views in Sharepoint. Then I exported it from Sharepoint designer and I use that template to create a library for each new project.
The problem is, the Infopath template always has the same ID. So when you open a story from a different project, you get a "Form Template Conflict" in InfoPath. The only way I found around this is to upload the form template to a Library of a unique name (this changes the Form template ID). But the problem with this is when I create a new, unique library I lose all the cool useful views which were included when I exported the Library. I tried changing the ID:
Form Template Conflict - Same Form ID When Copying Template
But this didn't work, when I published it, it reverted back to the generated one.
Thanks
Upgrade to SharePoint 2007

Resources