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
0
votes
2 answers

How to put a line break in between each item in a merge field (for formatting purposes)

I have a Mail Merge attached to a SQL query that I need to reformat. The 'action_name' field was inserted and works properly. [EDIT: To clarify, all of the data appears under one mergefield name called "action_name"]. For example, it will appear in…
byobob
  • 99
  • 1
  • 13
0
votes
2 answers

Word Document - Replace text in Header Table with Mergefields

I have a set of documents (lots) where the header in each has a table in the header with hardcoded address entries. I need to update all these documents to replace these hard-coded address with mergefields. The code is in an excel spreadsheet where…
andythpa
  • 21
  • 1
  • 4
0
votes
1 answer

How to store different view in a single Microsoft Word document?

I would like to create an application that allow users to add user-readable text in word document and at the back end maintain complex text (syntax) like MergeField or Velocity code. e.g. Simple text: Hello Mr. Bob. Complex syntax: Hello…
Akhil
  • 11
  • 4
0
votes
0 answers

Replace MergeField of DOCX in PHP

I have a Word template (DOCX) with mergefields and many condition with this mergefields. For example : I want to complete the mergefields in PHP. I know that a data source can be given to WORD to do that but i don't know how to do this in PHP. Have…
Tom59
  • 125
  • 3
  • 14
0
votes
1 answer

Syncfusion DocIO Replace Text with merge Field

I have a whole bunch of document which have a plain text place marker like ~{fieldToBeReplaced} and I want it to be replaced with a Merge field. I have the following code which kind of inserts the merge field and then inserts the text <<…
Traci
  • 908
  • 1
  • 13
  • 31
0
votes
2 answers

Word Field "Syntax Error"

In a word file if have a field looking like: { = { IF "${COSTS}" = "" 0 "${COSTS}" } \# "#.0000" } -> That gives my a Syntax Error! However the following works fine: { = { IF "100" = "" 0 "100" } \# "#.0000" } P.S: ${COSTS} is a placeholder that…
binfch
  • 31
  • 3
0
votes
2 answers

how can i replace all text with merge field in document

i have two 'DEMO' word and i want replace that with mergefield but just one 'DEMO' was changed using my code... how can i replace text with field?? thanks Application app = new Application(); Document word = new Document(); …
Hee
  • 73
  • 1
  • 9
0
votes
1 answer

C# - Replace mergefield inside IfField

I use a Word document as a template as following: Hello my name is {MERGEFIELD Name /*MERGEFORMAT} {IF {MERGEFIELD Gender /*MERGEFORMAT} = "M" "Your gender is {MERGEFIELD Gender /*MERGEFORMAT}" ""} My C# program looks like…
madhatterx
  • 53
  • 8
0
votes
1 answer

Different name in mergefield

I have a Word document with one mergeField who has name "NBJ" I open document.xml and I found MERGEFIELD NB The document works fine, but I don't understand why I haven't the same merge field name ?
Joc02
  • 345
  • 8
  • 18
0
votes
0 answers

C# OpenXML 2.5. I want to replace a merge field with an image

I have a requirement to insert a mergefield say << MERGEFIELD Image >> and replace it with the actual image. I know how to loop through FieldCodes and when the field name matches with the merge field name, replace it with a TEXT value. But my…
0
votes
1 answer

VBA Word format mergefield

I have a fieldfunction that formats a given number (price) from an excel table. i.e.: Fieldname = FieldName & " \# #.##0,00 USD" It works, but if the value is less than a thousand, the hashes and the point are read as spaces. How can I remove or…
BobLee2km
  • 11
  • 2
0
votes
2 answers

Merge field watermark - Microsoft Word 2013

I want to add a conditional Watermark in a word document using merge field. Is there any way to accomplish this? Is there any way to use merge field condition like below to add "DRAFT" watermark? or any other way to use a condition to make a…
0
votes
1 answer

Nested IF field in Word VBA

I'm trying to create a word addin that adds complex IF Statement Creation, from a list of possible mergefields. Complex is { IF { = OR ( { COMPARE { MERGEFIELD Field_1 } <= "Value" }, { COMPARE { MERGEFIELD Field_2 } >= "Value" } ) } = 1 "True…
0
votes
1 answer

.NET & Word - How to Convert PlainText to MergeField in Document

i am using Visual Studio .NET (VB) So if you have a solution in C#, just go here first (http://converter.telerik.com/) I have a document with text, and an array of words to replace: I need to replace the plaintext and substitute with actual…
Ess Kay
  • 598
  • 4
  • 20
0
votes
0 answers

Edit several Mergefields with the same text

I am using MSDN example code to replace a mergefield with some text. However if I have more than one mergefield with the same text, the code only affects one and not the others. How do I solve this? This is the code I'm using foreach (var field in…