Questions tagged [mergefield]

Merge fields allow you to define a placeholder where pieces of dynamic information can be injected (e.g. Mandrill email templates, Office Word)

72 questions
1
vote
0 answers

Openxmlsdk: Replace MergeField by html text

I'm using DocumentFormat.OpenXml to replace merge fields in my template docx file. Step 1, I write method to find merge field var instructionRegEx = new Regex(@"[\w]*\sMERGEFIELD\s+(?[\w]+)", RegexOptions.IgnoreCase |…
Minh Giang
  • 631
  • 9
  • 28
1
vote
1 answer

How do I insert a mergefield into an If..else statement in VBA using Word MailMerge?

The below macro will input the field heading followed by the field value. The If statement should check the value of the field and if its greater than 30 the actual value is given, otherwise a zero. Instead of the value appearing if it's true, I…
WillacyMe
  • 562
  • 1
  • 6
  • 25
1
vote
2 answers

Mail Merging Photo ID's in Word 2010/2013

I've been spending a number of days on this issue, and I would appreciate if someone can help. I've got an Excel sheet of data fields, with a field containing the paths of photos that I would like to create an ID card Mail Merge onto Avery…
Veronica
  • 11
  • 4
1
vote
1 answer

Microsoft Word mergefield token polish currency formatting

I want to Format number from 1,234.25 to 1 234,25. I tried below mergefield formatting but it did not gave the expected result {MergeField token \# "# ###,##"}. I have been googling whole day but no luck.
Pratik Kaje
  • 685
  • 8
  • 23
1
vote
0 answers

Creating list of mergefiels in word document

I would like to create list of mergefield which are inside Word template. After asking goole i find and use that code: static void Main(string[] args) { //OBJECT OF MISSING "NULL VALUE" Object oMissing = System.Reflection.Missing.Value; …
mikroice90
  • 137
  • 1
  • 9
1
vote
1 answer

Obtain value from mergefield C# Word VSTO

The title says all, but I'll explain more in detail. Here is the thing. I'm currently developing extra code in a Word VSTO add-in which uses mergefields in a template. The mergefields in the template are filled using data from an external file. What…
ValarmorghulisHQ
  • 989
  • 1
  • 11
  • 31
1
vote
1 answer

Export data from C# winForms treeView to MS-Word MergeFields

I have a winForm app written in c# and i have a treeview contains files from a directory. It also contains data about each files (fullpath,creation time,size) it look like this: I am trying to export this data to MS-Word template look like…
Nissim
  • 31
  • 1
  • 5
1
vote
1 answer

VBA Extract all Merge Fields data from Directory of Word Docs and list them in Excel

Find below code to Run through a directory of Word Documents and extract all of the merge field data in Excel. You will need the following ticked in Tools > References: Microsoft Scripting Runtime Microsoft Forms 2.0 Object Library * OLE…
The Benetrator
  • 367
  • 7
  • 18
1
vote
1 answer

Adding Style to Merge Field Text

Thanks in advance for any help, I have a word document in Microsoft Word 2010 for which I am using Merge Fields to put text into certain areas of the document. In the text that gets put in the Merge field, is it possible to put styling inside that…
Steve M
  • 53
  • 4
  • 12
0
votes
2 answers

MERGEFIELD for Values with Superscript for dates Microsoft Word

Having 1{sup|er} janvier 2012 for the MergeField Microsoft Word for Email. The format that we have is fmDD"{sup|er}" month YYYY This is the format that we currently use and wondering if there is a way for this to be corrected in the Word…
Aizen
  • 1,807
  • 2
  • 14
  • 28
0
votes
1 answer

Refer to a Word for Mac merge field in an applescript

tell application "Microsoft Word" set theDoc to active document set theRecipient to "johnbrown25311@gmail.com" set theSubject to "Merged document" set theBody to "Please find the merged document attached." tell application "Microsoft Outlook" …
0
votes
1 answer

How to get the Table inside a MS Word bookmark and add multiple rows based on its Mergefield cells using docx4j?

Till now am able to parse a docx file using docx4j and find the bookmarks and all the tables in a docx file using below code: WordprocessingMLPackage wordMLPackage = WordprocessingMLPackage.load(new java.io.File(docxFile)); List paragraphs =…
s3-89
  • 75
  • 1
  • 8
0
votes
1 answer

C# OpenXml .net Replace SimpleField with text

I created template document with couple of mergefields and I wanted to fill them with values from c# app. Problem is because I cant find way to replace OpenXml SimpleField with text. There is a ton of articles how to replace FieldCode with value,…
Krkec
  • 121
  • 1
  • 4
  • 14
0
votes
2 answers

Else value in nested IF mergefield not working in Word

I'm trying to get a nested IF statement to work but the ELSE statement doesn't seem to be resolving. Everything else seems to behaving correctly including the various outputs. What am I missing in my statement? { IF { MERGEFIELD CODE } = 0001 "Case…
BoBFiSh
  • 102
  • 9
0
votes
0 answers

How to keep leading spaces in merge fields (MS Word)

I have problem with merge field in word document , i created merge field like this: { MERGEFIELD string_data } I try to add some text to the merge field with leading space, example: " Test String" after I added the value to merge field the…