Skip to main content

Notifications

Microsoft Dynamics NAV (Archived)

how to merge fields to a header in a style sheet for printing?

Posted on by Microsoft Employee

Hello,

I have a problem that I'm creating Word stylesheets, but some of my merged fields need to go in the header of the Word document.

This looks fine on screen on the Word document, but when I print it it just prints the merge field names eg <<Sell-to Customer Name>> and not the actual merged data.


Can someone help me how to make this work and print correctly?

Thank you

*This post is locked for comments

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: how to merge fields to a header in a style sheet for printing?

    Thanks Mahesh, maybe I'll just have to leave the header then! Instead then on each one we have just copied the header and pasted it back as text which is a workaround.

    On the formatting - yes I select the merge field so it highlights then format it like you normally would in Word eg select 'sentence case' - but when you run the Stylesheet it doesn't pick it up.  I am using Word 2013.

  • mmv Profile Picture
    mmv 11,465 on at
    RE: how to merge fields to a header in a style sheet for printing?

    Hi,

    I don't think that it works on the header of the document.  The formatting must work.  Did you formatting the Merge Field?

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: how to merge fields to a header in a style sheet for printing?

    Thanks Mahesh

    But I am finding that although removing and re-adding the field works normally, it doesn't work for me in the header of the document!

    Also is there a way to make the merged fields pick up formatting in the Word document eg sentence case, UPPERCASE, etc? - I have tried formatting the merge fields like this when designing the stylesheet but the format doesn't come through on the actual merge.

  • mmv Profile Picture
    mmv 11,465 on at
    RE: how to merge fields to a header in a style sheet for printing?

    Hi Threeea,

    It's due to that format of the field in the word document.  You may remove the above said <<Sell-to Customer Name>>, remove the unwanted space in between and try to place it again from Merge Fields, it must work.  It works well.

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: how to merge fields to a header in a style sheet for printing?

    Actually I've realised it's not just when I print - the same happens when I save to pdf or standard Word document (from the original xml output).. :(

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,253 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,188 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans