Insert document expiration date in a Word template

Hello all,
I have a problem I hope anyone can help me with. I need to include a column in Document Library with the Document expiration date and after that, include that expiration date into the Word templates I have in that library.
In order to do that, I created a date column (not a calculated one) called "ExpDate" with a default value of Today + 365 as I want the document to expire one year after its creation. After that, I edit the word templates I have associated to the
document library so as to include the new "ExpDate" column as a Quick part.
The problem I find is the following: When I create a new document based in the document templates (through content types), the user has the chance to insert an expiration date (as it is metadata) or leave it empty (the column is not defined as mandatory). If
the user leaves the expiration date empty, the new column is filled with the default value (today + 365 days) but when I open the word document I see the name of the column [ExpDate] instead of the default value.
Is there a way of forcing the document information panel to be filled with the default value?
Do you imagine an alternative solution to the requirement of including the expiration date inside the document without having to be defined by the user?
Thanks a lot.
Regards.

Wordsub.llb should be somewhere in your Labview folder on your local drive. The path to it in my install is: C:\Program Files\National Instruments\LabVIEW 8.6\vi.lib\addons\_office\_wordsub.llb
Also what specific problem are you referring to about 17 bookmarks? Is that the limit on the express style VI for filling them in from LV? If so what you will need to do is to use the lower level function 'Word Insert Field' under Word Advanced VIs. You will need to supply the VI the name of the bookmark and the text you want to insert.

Similar Messages

  • Document Expiration Date Not Updating

    Hi,
    I’ve implemented a document retention policy based upon a custom date field. The custom date field is not for users to edit so it defaults to 1/1/1900 for new documents and I have written a console app that updates the custom date field to an appropriate
    date. The problem is that the expiration date, both for new and existing documents, doesn’t update. This is also the case if I update the document properties manually. In dev updating the custom date field, manually or via code,
     triggers an update in the expiration date but this isn’t happening in UAT. We’re using a content type hub in UAT although I can’t see how that makes a difference as the information management policies have been distributed correctly.
    Does anyone have an ideas as to why the expiration dates are not re-calculating?
    Thanks in advance
    Neil

    It is running and I've run it manually a number of times. But my understanding is that the job only updates new or amended expiration policies, it doesn't re-calculate for existing ones. That aside, the expiration date should update immediately when
    the field upon which is based is updated - at least that's the behaviour I've seen in development.

  • Report generation is saving data to a word template

    I created a template for a program to write test result data when prompted by the user. My problem is that after the template is written to and closed it's asks if the new data shoule be saved. I don't want to give the user that option because it actually saves it to the template not a document, and when another test is done and report is requested, it doesn't write over the data fromt the previous results, it adds to it. Is there some sort of Word security option or a vi that might be helper to prevent users from saving data permanently, to overwrite previous data?

    Harene,
    The ActiveX call to Quit comes with a parameter to Save Changes (T or F). I would suggest making that the last call you make. This is how the Dispose Report.vi is made in the Report Generation Toolkit for Microsoft Office. (This was checked on my machine with Office 2000.)
    Randy Hoskin
    Applications Engineer
    National Instruments
    http://www.ni.com/ask

  • Report Generation Toolkit: How to programmatically insert same values across a MS Words template

    Hi,
      I currently have written an application that reads information from an Excel/CSV file and key into the Words document.
    I did this by introducing a specific bookmark inside the Word document and use the Append Report Text.vi to insert the bookmark.
    Now, there are some values where it requires the same bookmark to appear in multiple places. Ie. The same value should be replicated
    in many places. I tried to insert cross-references in the template, but whenever the Append Report Text is performed, it overwrites the bookmark.
    Hence the cross reference cannot find the bookmarks again.
    Another issue is the font size of the replacement. It seems that it keeps on replacing it at Font 10.
    Whenever the above VI is called. Is there a way to retain the same bookmark font as per what was saved as the template?
    Thanks & Best Regards,
    Kah Wai

    I think I manage to resolve this using the VI created by Henrik Volkers
    http://forums.ni.com/t5/LabVIEW/How-to-edit-text-in-MS-Word-HEADER-using-bookmarks/m-p/1477060#
    Sorry for the post

  • Change material document -- Expiration date.

    I have already created a new BADI which contains interface MB_DOCUMENT_BADI. There I use the method MB_DOCUMENT_BEFORE_UPDATE. What I want to do is to modify the expirate date (VFDAT) from MSEG.
    I thought that I could use BAPI_CUSTOMERCONTRACT_CHANGE but I can't because I don't have any <b>order</b>. The parameters I use to create the material document are next: GOODS RECEIP --> OTHERS --> movement 501. After that I enter the information of the material.
    After that I want to check if the expirate date has been insert or not. If it is not, I want to insert 31.12.9999 (dd/mm/yyyy).
    I tried to use this fuction: MB_CHANGE_DOCUMENT also with IN BACKGROUND TASK and after that COMMIT WORK.
    The program doesn't do anything, and it is just because in transaccion SM58 it says "MISSING PARAMETER WITH PERFORM".
    Which BAPI or FUNTION can I use to resolve my problem?? I'm completely locked!
    Thank you very much in advance.
    Best Regards.
    Naiara.
    Message was edited by:
            Naiara Espinosa

    Hello Naiara,
    How did you solve this?
    Thanks!!

  • Document expiration date?

    Hi,
    I don´t know if this is possible... I want put a date expiratacion in a document, can i? How?
    Thanks in advance,
    Regardsm

    Hi,
    You can give Valid from and Valid  properties to a document.  Before that its doucment parent folder should be lifetime enabled. You also need to activare the Time dependent publishing services.
    Then people having only read permission can only see only betweenthe valid from and valid to dates.
    People having full rights can see even though the time expires.
    Raghu

  • Can I export the data collected in a PDF Form to a Word Template?

    I work in the legal field and constantly have to draft the same legal documents over and over. I would like to creat a form that allows me to collect the data I fill in as well as export that data into the word templates for legal document drafts. Is this possible?

    Hi,
    The Acrobat Forms forum would be a better target for your question:
    http://forums.adobe.com/community/acrobat/forms
    Regards,
    Brian

  • Auto-generating word documents from word templates

    How would one go about generating a word document based off of a word template (.dot)? For example, I have a simple JSP form which has a field "Last Name". When submitted, the "Last Name" is plugged into a corresponding bookmark in a .dot file. Then the .dot file is saved as a .doc file and presented to the user for download. So, breaking it down:
    1. User fills out a jsp form with "Last Name" and hits the submit button
    2. The submit button triggers a routine to:
    a. open a .dot file on the server (static location)
    b. find the bookmark where the last name should be plugged in
    c. plugs the value of last name
    d. saves the .dot as a word document
    e. presents to the user for download
    Has anyone done a similar thing before? Any pointers?

    There's a lot of templating projects around that are usable in Java. I'm not aware of any that use closed proprietary technology like Word and I wouldn't base my design on that either. If you're stuck with that idea then I don't have any suggestions.

  • Links to Word template from Reader X

    I have setup pdf document with links to Microsoft Word templates. They were working correctly in Reader 9 and they are working correctly when opened from Acrobat X Professional but when I open pdf file in Reader X the do not work. In Acrobat Pro clicking on link opens window which shows the name of the template i.e. sample.net. In Reader X it is showing the path to Winword.exe. Template is opened but macros are blocked. Can I modify some settings of the Reader X to have it working properly as it does in Acrobat Pro ?
    Thanks for help.
    Tony

    If it worked before but doesn't work after you "upgraded" then, you upgraded the wrong thing.
    You "may" have had Adobe Acrobat before but now you have Adobe Reader which cannot do what you want.
    Look around in your program files. Reader should not have removed Acrobat if that's indeed what you were using.

  • Send an internal mail (SAP inbox) to a user and select the expire date

    Hello!,
    This is my first question in this forum. I need to send an internal mail to a user and I must insert a expire date.
    I try to use the FM 'SO_OBJECT_SEND' and it's works but I don't know where I can insert the expirte date.
    Can you help me?, please.
    Thanks a lot.

    Hi,
    Try this..
    In the parameter OBJECT_HD_CHANGE there is column DLDAT (Expiry date) & DLTIM (Expiry time)...Give the date and time in this column and then check..
    THanks,
    Naren

  • Inserting date & time in Word 2008 document

    I'm trying to create simple AppleScript and I'm hoping someone on here can help me.
    I work in Word 2008 for Mac and want to create a script that simply inserts the phrase "Left message(space)" plus the date and time whenever I run the script. I'd also prefer that the phrase be in italics if possible. I use this because I often call people and leave them a message and I like to keep a record of when I call them.
    I found this script online and modified it hoping it would meet my needs:
    tell application "Microsoft Word"
    tell selection
    type text text "Left message "
    create new field text range text object of selection field text {"DATE \\@ \"MM/d/yyyy\""}
    end tell
    end tell
    The result is that when I run the script, I get something like this in my document:
    Left message 6/10/2010
    It's a good start, but there are two problems with this.
    First, I would like to insert both the date AND the time.
    Second, when it inserts the date, it makes it an "update automatically" date that updates to the current time every time I open the document. This obviously doesn't help me keep a record of when I made a call. What I would like is for it to just insert the current date and time without updating automatically.
    Third, if possible, I would also like it to be in italics.
    It would look something like this:
    +Left message 6/10/10 5:29 PM+
    I appreciate any advice people can give.
    Message was edited by: LJH_CMH

    Second, when it inserts the date, it makes it an "update automatically" date that updates to the current time every time I open the document
    Sure, that's because you specifically tell it to. Your script inserts a 'new field' which is analogous to Word's dynamic text objects (date, time, page number, etc.)
    Instead, what you want to do is insert an actual string of characters - sure, to you and I that string of characters might look like a date and time, but to Word it's nothing more than a series of characters.
    For that we can fall back on AppleScript's date features, specifically current date, like:
    tell application "Microsoft Word"
      tell selection
        type text text "Left message " & (current date as text)
      end tell
    end tell
    Note that current date as text returns a rather verbose form of the date. If that's too much for you there are alternate options, such as:
    short date string of (current date) & space & time string of (current date)
    which will look more like: "6/10/10 3:26:50 PM"
    But there is also a myriad of other ways (with seconds, without seconds, 12/24 hr, etc.) depending on what you want.
    Third, if possible, I would also like it to be in italics.
    I'll have to look at that one, unless someone else beats me to it.

  • Saving only a portion of a Microsoft Word template into a new document using LabVIEW Report Generation Toolkit

    I have a Microsoft Word template I want to populate programmatically with test data. The template contains both explanatory text and a data sheet section with test data placeholders (bookmarks). Using the Report Generation Toolkit for Microsoft Office, I have been able to successfully populate the placeholders with data and save the results into a new Microsoft Word document. The problem is the new Word document contains not only the test data but also the explanatory text that was in the original document template. Ideally, I would like to have the generated document contain just the test data without the accompanying text. Is it possible to do this usi
    ng the Report Generation Toolkit?

    Hello Ryan,
    Two easy options come to mind.
    1. You may want to consider using an �ink annotation� instead of regular text for your explanation.
    2. You can programmatically do a find and replace on the explanatory text. Have LabVIEW find the whole paragraph, and replace it with nothing.
    If none of these suggestions help, or if I�m not correctly understanding your issue, please reply with comments or answers to the discussion above and any additional information that may help, and I�ll be happy to look further into it.
    Have a nice day!
    Robert Mortensen
    Applications Engineer
    National Instruments
    Robert Mortensen
    Software Engineer
    National Instruments

  • Create MS Word documents from data in an Apex Form/Report

    My requirement is to create editable RTF form letters from data managed by an Apex application. I do not have BI publisher available and am looking at using the XSL-FO route. Effectively I want the user to select the desired data in the Apex application, hit a button and be presented with a word document containing the data, which they can then customise.
    I know how to set Apex up to create PDFs based on reports using embedded XSL-FO but PDFs are not editable extra steps by the user. Also the user could export data to CSV and mailmerge with a word template but thats extra work for the user too.
    In the past I've used PLSQL/XML/XSL-FO with .NET to do what I want here by generating an XML file with PLSQL and using .NET to associate the XML file to XSLT/XSL-FO template files creating output as varied as .doc, .ps and .html files.
    Any ideas on acheving the same flexibility with Apex would be greatly appreciated. As my googling and forum hunting has not turned up much.
    Thanks
    FunkyMonkey

    Hi FunkyMonkey,
    Do you know Docufy | Simplify with docufy ? It's an APEX application that lets you create/generate/edit word templates. Else JasperReports Library | Free software downloads at SourceForge.net lets you generate a multitude of report formats (RTF/pdf/docx/xlsx/xml/etc.) you can use iReports to easily create xml templates for the reports, It's a lot simpler then xsl-fo.
    Regards,
    Vincent Deelen

  • Insert Date into Indesign CS3 template

    I had a script that worked great in CS2 but when I upgraded to CS3 it doesn't work. I posted on here to find the problem with no help so I"m starting from scratch.
    Its it possible to insert the date into a template with a script in CS3
    Example: SUNDAY, August 24, 2008

    Here the script is again... Don't know what to say? it works in CS2
    //DESCRIPTION: Use to insert date/time into document.
    if (app.documents.length == 0) { exit() }
    insertDTs(app.documents[0]);
    function insertDTs(aDoc) {
    var curPrefs = aDoc.characterStyles[0].extractLabel("dtprefs");
    if (curPrefs == "") {
    // Doc has no prefs; use saved prefs
    curPrefs = getCurPrefs(File(getScriptPath().absoluteURI.replace(/Insert\.jsx/, "Prefs.txt")));
    } // end if curPrefs
    var prefParts = curPrefs.split("\n");
    if (prefParts[2] != "[None]") {
    insertIt(aDoc, prefParts[0], prefParts[2]);
    if (prefParts[3] != "[None]") {
    insertIt(aDoc, prefParts[1], prefParts[3]);
    function insertIt(aDoc, formString, cStyleName) {
    var formStrings= ["Day, Month, Year"]
    var theFuncs = [dayMonthYear]
    var charStyleStrings = aDoc.characterStyles.everyItem().name
    if (indexOf(charStyleStrings, cStyleName) < 1) { return } // style not found or is No Style
    var func = indexOf(formStrings, formString);
    if (func < 0) { return } // requested form not recognized
    var dateString = theFuncs[func](new Date());
    app.findPreferences = app.changePreferences = null;
    aDoc.search("", true, true, dateString, {appliedCharacterStyle:cStyleName});
    } // end insertIt
    function dayMonthYear(date) {
    date.setDate(date.getDate()+1);
    // returns dayName, monthName date, year
    var myDateString = date.toLocaleDateString();
    myParts = myDateString.split(" 0");
    if (myParts.length != 1) {
    myDateString = myParts[0] + " " +myParts[1];
    return myDateString.slice(0,-5) + "," + myDateString.slice(-5);
    function indexOf(array, find,offs) {
    for( var i = offs == undefined ? 0 : offs; array.length > i; i++ ) {
    if( array[i]==find ) {return i}
    return -1;
    function getScriptPath() {
    // This function returns the path to the active script, even when running ESTK
    try {
    return app.activeScript;
    } catch(e) {
    return File(e.fileName);
    } // end try
    } // end getScriptPath
    } // end insertDTs

  • New document in library using Word template - columns filled but Word doc is blank

    Hi
    I have a document library using a Word template. It works fine in testing: New Document opens the template, the form at the top of the document is filled by the user, the data populates the fields within the template, the user saves it in the document library.
    But... I have a user with an issue: When she adds a New Document and fills out the form at the top of the Word template, the data doesn't populate the fields within the document itself. It saves into the library columns ok, but the fields within the Word
    document remain blank.
    She has Office 2010, XP and IE8. It's SharePoint 2010.
    Any ideas how to resolve the issue would be appreciated!
    Thanks
    Stuart
    Further information: I emailed the Word template to the user. She opened it and could only input information into the Information Panel at the top, not into the fields within the document.

    Dear Boris,
    I'm sorry I haven't replied sooner - I was away for a break. Anyway, I've done an Office repair but sadly the behaviour is the same as it was before I did that. However, I noticed that the behaviour is now different from when I first posted about the problem.
    Then I got an error now there is no error and it proceeds as if the behaviour is what should be expected. So now when I click "Add Document" I just get the standard "Add a document" dialog box. Oh well, its not the end of the world.
    Anyway, thanks for your help and suggestion. If I work out what is wrong I'll put a post on here.
    Best wishes.....
    Colin

Maybe you are looking for