Results 1 to 7 of 7
  1. #1
    New Lounger
    Join Date
    Dec 2010
    Posts
    15
    Thanks
    1
    Thanked 0 Times in 0 Posts
    Hi folks I hope you can help me, I've been struggling with this for hours.

    I cant seem to increase the mergefield date by one year in word.

    I have a mergefield date called acceperiod - this data is pulled from a database- this then put into a word template as «acceperiod»

    When I edit the field code it displays the following: MERGEFIELD acceperiod

    When opening up MSWORD it displays: 01/01/2000, however I want word to add a year on, and display it as: 01/01/2001.

    What forumla would work and what should I enter on the code field, I've tried playing with switches and various formulas but I think I'm getting it all wrong.

    I'm a bit lost, None of these work:

    MERGEFIELD acceperiod [DD MM YYYY}+1}]
    MERGEFIELD acceperiod {SET Year {={DATE @ yyyy}+1}}
    MERGEFIELD acceperiod {=DateAdd(D,365)}

    [attachment=90937:InsertField-MergeField.png]
    Attached Images Attached Images

  2. #2
    Super Moderator
    Join Date
    Jun 2002
    Location
    Mt Macedon, Victoria, Australia
    Posts
    3,993
    Thanks
    1
    Thanked 45 Times in 44 Posts
    I don't know much about mergefields, so I would add the year via an extra calculated field in the query in the database, then use this calculated field as the source for the mergefeld.
    Regards
    John



  3. #3
    New Lounger
    Join Date
    Dec 2010
    Posts
    15
    Thanks
    1
    Thanked 0 Times in 0 Posts
    I dont have access to the database unfortunately

  4. #4
    Super Moderator jscher2000's Avatar
    Join Date
    Feb 2001
    Location
    Silicon Valley, USA
    Posts
    23,112
    Thanks
    5
    Thanked 93 Times in 89 Posts
    If you think of your MERGEFIELD as some input data for Word's other fields, you should be able to manipulate it in the ways described by macropod in this thread: [topic=249902]Word Date Calculation Tutorial (v2.85)[/topic]. The discussion is very long as many people raised issues and questions, but the first post should be up-to-date. Any luck?

  5. #5
    New Lounger
    Join Date
    Dec 2010
    Posts
    15
    Thanks
    1
    Thanked 0 Times in 0 Posts
    I got the document, but was'nt sure what section would be applicable to me, cant get any of them to work, tried playing about with it for days now. lol.

  6. #6
    Super Moderator
    Join Date
    May 2002
    Location
    Canberra, Australian Capital Territory, Australia
    Posts
    5,055
    Thanks
    2
    Thanked 417 Times in 346 Posts
    Hi RA,

    In the tutorial, read the item titled 'Date and Time Calculations In A Mailmerge' and apply the process described there to the example field under the item titled 'Calculate a day, date, month and year, using n years delay'.
    Cheers,

    Paul Edstein
    [MS MVP - Word]

  7. #7
    New Lounger
    Join Date
    Dec 2010
    Posts
    15
    Thanks
    1
    Thanked 0 Times in 0 Posts
    I didn't manage to get any of the mergefields to work, not sure what I was doing, however opted for the listbox feature which allows users to select future dates from a list.

    Thanks for the help though, still would like to know if it would have worked or not....maybe another day.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •