Changing Document Template Programatically

My requirement is that after a certain step in a workflow the document will be send to another library and an MS Office watermark will be inserted automatically to the document.
What I am trying as one of the solution to create a similar content type and then put the water mark into the that CT, then after the specific stage in the workflow change the CT of the document programmatically to the CT with watermark, which I am able
to do correctly.
But the problem is that although the CT is changing the document template still remains as that of original CT i.e. the one without watermark.
do anybody have any idea about the problem or any other alternate solution to the scenario?

I did something similar a few years ago.
changing the content type doesn't change the document template. The template is only used when a document is created (not uploaded). I ended up changing the value of a field. (in my case 'document security level'). changing the value would then change an
image in the document.
I used the Insert -> Fields -> formula's to then display some content. I guess you could also use macros.

Similar Messages

  • MS Word 2007 Problem: Could not Change Doc Template

    I started getting an error when I open a rules document through OPM. The document usually opens ok, but OPM gives the error "Oracle Policy Modeling was unable to open the document as an error occurred with MicroSoft Word: Could not change document template.
    Usually, I can work in the document with no problems, but sometimes when I do the compile of the document that got this message, the compile and save works, but then Word crashes. The compiled document is available through OPM, but it thinks the document needs to be compiled on a build. I've learned to continue without compiling, otherwise Word will crash again.
    Other times, the document compiles just fine with no problems with Word.
    Occasionally, Word loses the Add-ins list. I've figured out how to attach it again.
    Everything was fine until about 2 weeks ago. The only difference I can think of is that Word did an automatic update. I uninstalled and reinstalled OPM, but it hasn't made a difference.
    I'm running OPM 10.1.0.27 on XT.
    Any ideas? Thanks,
    Terry

    Hi Terry,
    Try the following workaround:
    1) Rename the word 2003 template (Policy Modeling Word Template) in c:\program files\oracle modeling\templates to another filename
    - This is to force Word 2007 not to load the Word 2003 template
    2) Open the Word document from Policy Modeling
    - To load the Word 2007 template and attached it to the document
    3) Save the document
    (Thanks to Red Canda for this.)
    Davin Fifield

  • Ask your question.How do I change the template for a pages document

    How do I change the template for a pages document?

    Once you've opened it, the opened document is no longer a template. Edit it as you would any other Pages document.
    If you want to use the edited document as a Template, then , after editing, go File > Save as Template, give the new template a name, and click Save.
    The old template will remain available in the location where you found it; the new one will be in the My Templartes sectionof the Templates Chooser.
    Regards,
    Barry

  • By default new document/templates start with above, How I change to be Strict 1.0 XHTML ?

    by default new document/templates start with above, How I change to be Strict 1.0 XHTML ?
    Tell me for Dw MX2004 & CS4 ?
    If I start with Transitional 1.0 XHTML and want to change to Strict 1.0 XHTML the only way is modify code or make a new doc ?

    Using CS4, there are a few ways to do it:
    1.  when creating a new document - you can select the doc type preference.
    2.  In your preferences, you can set up which document type will be opened when you select a new document.
    3.  If you start with one doctype and want to convert it to another use:

  • Integrating OneNote with Sharepoint 2013 - Custom document template, Change Content type, Checkout settings

    My client is migrating to SharePoint 2013 and the team uses OneNote Task list to track the project checklist. While I am successful extending the document template to support OneNote, still have some mysteries to solve as listed below:
    I am exploring Sharepoint 2013 and have tried to explain my problem clearly. If the information provided below is not clear enoug, let me know.
    1. Client has defined custom content type for all the documents in a library. I noticed OneNote comes with a Content type as "Folder". Is it possible to edit / modify the OneNote metadata to accommodate the predefined content types?
    2. In a library, I would like to defined multiple OneNote templates - Meeting, Task List, etc. I followed this article to create OneNote template for a library. Is is possible to edit the template and have "Meeting template" as default?
    3. A library can have multiple document types - word, excel, presentation, OneNote. In order for OneNote sync to work, below settings are mandatory (correct me if wrong):
            a. Checkout required should be set to "No"
            b. No versioning should be set
    My client's governance rule states "Checkout" is mandatory. How can I have a library to support OneNote with Checkout option enabled.
    Thanks in advance!

    Hi TMUser,
    regarding your questions:
    1. One note is based on folder not content type, so by design it is different items. but i heard you can have a look up for this, you may try to change my onenote notebook folder content type so that it allows for additional metadata columns. this way, the
    onenone notebook can be handled just like other office documents. for more detail you may try from this example: http://www.sharepointcowbell.com/2013/01/onenote-and-metadata-in-sharepointpart.html
    2. for onenote products, you may ask at onenote forum for more detail, http://support.microsoft.com/ask-community/office/onenote-2013/,
    we can help for general discussion regarding this. you may take a look at this article, it mentioned about set template as default: http://blogs.msdn.com/b/onenotetips/archive/2008/05/21/templates-in-onenote.aspx
    3. for this question, you may check this kb, http://support.microsoft.com/kb/2675731/en-us, i
    think it is by design, because onenote and other office are different, onenote is use shared, if we put checked out, then it will be set the limitation to only exclusive user.
    Regards,
    Aries
    Microsoft Online Community Support
    Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread.

  • Programatically export each Document Template referred to by the Content Type Configuration to a folder

    Hi there
    Help appreciated in "storing each document template referred to by the Content Type configuration to a folder programmatically".
    Regards,

    Hi,
    Okey, the following two articles for you to take a look at:
    Download All Folder and Files in Document Library (Sharepint Object Model)
    http://mykiavash.wordpress.com/2011/04/24/download-all-folder-and-files-in-document-library-sharepint-object-model/
    Download files as Zip File in SharePoint
    http://adicodes.com/download-files-as-zip-file-in-sharepoint/
    Best Regards
    Dennis Guo
    TechNet Community Support

  • I'm using Word for Mac. Though there are various instructions on the Internet for modifying the templates, none make sense to me. They instruct to do something I can't follow. I change a template but can't save it to the template folder.

    What the ****.
    OK, I try to change a template using Word for Mac version 14.3.4 2011 edition.
    I make a change to the template but am unable to save the darned thing to the template folder; it asks for a file name like it's a new document. I want to change the blasted template but if I can't save it as a modified template, I've accomplished nothing.
    Does anyone have a solution?
    Thanks

    Support for Microsoft Office for Mac

  • The Create List Item workflow action does not work in document library with document template

    My end goal is more complex but below is a basic example of the issue I’m having that just simply does not work.
    I'm trying to use a site workflow to create an item in a document library that has a document template applied to it but the file that gets created by the workflow is corrupt and cannot be opened.
    I created a document library and edited the document template by adding some text to the header and changing it to a Word docx file instead of a Word dotx file. I tested the document template by clicking the files tab in the ribbon and then clicking new
    document which opens the document template in Word and allows me to edit and save the document back to SharePoint. Then I created a SharePoint 2013 site workflow in SharePoint Designer that contains a single Create List Item action, and that action creates
    an item in the document library with the name field statically defined. I published the workflow and then manually start it on the site. The workflow completes successfully and when I navigate to the document library the document has been created by the workflow.
    When I click on the document to open it in the Word Web App it throws the error pictured below and if I open it in the Word client application it just opens a blank document and not the correct document template.
    I also tried using a SharePoint 2010 workflow with pretty much the same results. Opening the document in Word Web App gives the same error as above and opening the document in the Word client application gives the error pictured below.
    Come on Microsoft creating a Word Document in a SharePoint Document Library from a SharePoint Workflow should just work! Is this a bug or does anyone have any ideas on what is causing the this issue?

    I had the same problem with corrupted document - this worked for me:
    1. Create a 2010 Workflow which creates the list element in a document library
    (you may start this workflow from your 2013 workflow if applicable)
    2. In the Create New List Item properties - make sure to set ContentTypeId to your content type
    ("Id for indholdstype" is Danish for "Contenttype ID")
    3. Your Content Type template should be a ".docx" file - NOT a ".dotx" file...!
    (I have always created my templates for content types as .dotx files - seems Microsoft wants us to use ordinary .docx files as template files for content types)
    Hope this helps you!

  • How To Add Line Items to Workflow Document Template

    Hi Gurus,
    ive made a Workflow which has few containers referencing VBKPF, VBSEGS, and constructed two methods which one of them gets the table VBKPF data into MyStructure and the second the data into MyStructure2.
    Inside of the workflow i made two container operations and assigned those two methods to VBKPF and VBSEGS containers.
    The Problem is that VBSEGS is a (multi) line item table and it doesnt show me the data inside of the document template.
    What could be the solution for this scenario
    Thanks, Points for Reward

    Hi,
    i checked the swo1 methods and it looks good. I didnt change the binding that ive implemented, and some values are getting showed, but still they do not correspond to the BO element (concerning Acct.Doc.Nr)
    My binding is:
    Display Document Task:
    #######Workflow -> Step Display Parked Doc
    **************BO FIPP -> &_WI_OBJECT_ID&
    #######Workflow <- Step Display Parked Doc
    **************Empty
    Document Template:
    #######Workflow -> Step Create Doc From Template
    **************&_WORKITEM& -> &FLOWITEM&
    **************DC8BA2ADFCEA4EF18D2F00145EDCE7A4 -> &TEMPLATE&
    #######Workflow <- Step Create Doc From Template
    **************&WF_DOCUMENT_0001& <- &_WI_OBJECT_ID&
    **************&_WF_INITIATOR& <- &_WI_ACTUAL_AGENT&
    As ive explained earlier i have a Container VBSEGS with abap table vbsegs, which is filled using method ReturnMe2 with MyStruct2 structure.
    Regards
    Laurynas Prikockis

  • How to change page template for a single page?

    I create a new document based on the Pages "Reports > Business Report".
    Now the first page is formatted as a "Cover" page with a larger top margin.
    Via "Format > Advanced > Manage Pages..." I see there are what I assume are the "Page Templates":
    - Cover
    - Table of Contents
    - Chapter Page
    - Text Page
    - Appendix
    My question: How can I change the template for a single page in my document? E.g. I don't want Page #1 to be formatted as "Cover". I'd like it to be a "Text Page".
    Any hints?

    Just delete the Cover section and insert a Text Page.
    Click on:
    +Toolbar > View > Page Thumbnails+
    Click on the Cover thumbnail, it will be outlined in yellow, hit delete.
    It may start off with certain defaults but you do not have to accept them.
    Peter

  • Unable to edit document template in SharePoint 2013

    We have uploaded a set of templates that users can select from the drop down list in the Document field in the Document Library.  We now need to edit one of these document templates.
    We follow the procedure and make the edits which changes the template but when we then select that template from the drop down list, the edits have not been actioned.
    Can anyone please assist?

    Hi,
    As I understand, The modification was not saved back to the template.
    How do you edit the document template? 
    Check if the URL of the template is right. You can go to the site setting->site content type->click the content type you want to edit->advanced setting->edit the template->open the template, and click file->to check if the URL under the template is right.
    As a workaround, when you edit the template you can save the template in the local computer, and you can upload the template you have saved in the advanced setting for the content type.
    The article below is about how to create Document Templates for Document Libraries in SharePoint 2010, it also can work in SharePoint 2013.
    http://blog.henryong.com/2007/02/12/how-to-create-document-templates-for-document-libraries/ 
    Best regards,
    Sara Fan
    TechNet Community Support
    Please remember to mark the replies as answers if they help, and unmark the answers if they provide no help. If you have feedback for TechNet Support, contact
    [email protected]

  • Unable to change document owner

    Hi All,
    I am trying to change document owner of Master Agreement via Contracts.xls file.
            I am getting below error:
            # Record 1. Warning: the item Rama Kishore referenced in column DOC_OWNER_USER could not be found
    Also, I went through various posts and as mentioned in one of the post to assign "Document Owner" role using "user account.xls". But still I was not able to see this role in Security Tab of my user account.
    Another post says to use a template with following fields
           # Field
           # CLASS_NAME
           # PARENT_EXTERNAL_ID
           # PARENT_UNIQUE_DOC_NAME
           # LOOKUP_PRINCIPAL
           # LOOKUP_COLLABORATOR_TYPE
           # LOOKUP_COLLABORATOR_ROLE
           # PRINCIPAL
           # COLLABORATOR_TYPE
           # COLLABORATOR_ROLE
           # REPRESENTING
           # USAGE
           # SILENT
           but it gives error:
           # Failed: object 1: The object referenced in column DOC_TYPE could not be found.
    Please guide me on how to change document owner of an Master Agreement.
    Thanks,
    Saloni

    HI Saloni,
    Try to import the sample workbook  with your Data which I have sent to your email id. While importing select the object type as Master Agreement. Also make sure the user which you are trying to update should be available in the System.
    Let me know if it works.
    Thanks,
    Kushagra A

  • Document templates not visible in Complaints transaction

    Dear CRM gurus,
    CRM 5.0
    I created an MS word document template using tcode CRM_KW_TEMPL in CRM 5.0 for the business object type BUS2000120 which is a complaint. However, after saving the template when I go into CRMD_ORDER for creating a complaints transaction type & try creating a new document based on the template, the name of the template is not shown in the window which opens up for selecting the template.
    I have done the background config for setting up the document template profile, folder template & assigning these to the transaction type header. Can someone please let me know what could I be missing?
    Thanks
    Ritwik Sharma

    Please confirm if you see URL as http:localhost:99/_layouts/images. or http//:localhost:99/_layouts/images.
    Is it same behavior on all sites or just 1 site
    What do we see in Fiddler traces
    Did you made any changes in DOCICON.XML
    or some where else
    If this helped you resolve your issue, please mark it Answered

  • Send Storage Bins to external system (change pointer, change document, ...)

    Hello,
    I need to send to my external system the storage bin modifications, namely, insert and delete information.
    I haven't found any User Exits ou BADIs to the LS01 transaction.
    I'm trying to do this using change pointers, but it doesn't seems to exist a standard way to this either, so I've created a custom Change Document for the LAGP table, but there's still no records in the CDHDR or CDPOS tables.
    Is there a way to automatically generate this records without programatically calling the Change Document associated FM?
    What are the options that I have to do this?
    Thanks in advance,
    Rui

    Hello Rui,
    perhaps you can use DBTABLOG (Think about data volume and performance).
    http://help.sap.com/saphelp_40b/helpdata/en/34/60b6bfae724effe10000009b38f91f/content.htm
    Best Regards, Dirk

  • SharePoint Labels and Document Templates

    Hi, i added a SharePoint Templates to a library to update documents with the document version numbers:
    Did it like this if you need more info: http://daniecsp.blogspot.com/2014/02/add-sharepoint-version-number-to-word.html
    That was working updating the document every time the version number changed.
    Now i added Content Types with different Document templates to the library but the Document Property "Label" is not available anymore after the Content Type template is used.
    i Am out of the office for a few days so if i take a while to reply please understand.
    Thanks

    Hi, 
    This is resolved, just copied the label and quick part from another doc and that worked.

Maybe you are looking for

  • Repeat regions in DW CS3 & CF??

    Hello, I'm building a simple CF page within a site that lists external website links by category.  I have a 'links' table in my DB as well as a 'LinkType' table.  The 'LinkType table is populated with about 4 or 5 categories.  Here's my question.  On

  • Problem doing Applet exercise

    In my (swedish) course literature I am currently supposed to write an Applet that follows the actions of the window when it is resized . The point is to learn ComponentListener and making it runnable to avoid flickering. the applet is supposed to loo

  • ACS - Host restriction

    Hello How to restrict access to a specific host when a user connects via VPN. user account is mapped on ACS as external database ( Active Directory - Win3K ) Downloadable ACL only works with ACS Local Database. plz help.

  • Canon_ij_setup Wireless Network

    Hello, I noticed during the initial step of my MG3520 that it seems to broadcast a wireless signal known as canon_ij_steup, but then disapears later on. What is this network for and why does it disapear? My main area of concern is that it leaves the

  • Black Video on render

    I have been having a problem when rendering .h264 files. I will have the file go to render and some will render just fine, others will go black at some point through the render. Random points. All the layers are checked on but it just goes black. No