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
10
votes
9 answers

Position cursor at start/end of Word document

We are manipulating our Word 2007 documents from .Net using Word Interop. Mostly doing stuff with fields as in: For Each f In d.Fields f.Select() //do stuff with fields here Next This leaves the last field in the document…
hawbsl
  • 15,313
  • 25
  • 73
  • 114
5
votes
1 answer

Truncating a mergefield in Microsoft Word for mailmerge

I'm looking to create a formula and apply to a mergefield in Word 2013. I have no access to the db and only given merge fields. My goal is truncate/shorten certain mergefields. E.g. Full Name to just initial, Age [27 years] to short age [27]. Access…
Taz
  • 607
  • 2
  • 7
  • 10
3
votes
1 answer

Unusual XML notations of mergefields in DOCX file.

In our document generation system we use DOCX files in which we programmatically fill out mergefields. For this I'm using the OpenXml SDK 2.0. I've been plowing through the document.xml file, in de docx, and found that the mergefields are usually…
Joachim VR
  • 2,320
  • 1
  • 15
  • 24
3
votes
2 answers

Word - How to stick text to the bottom of page

https://SURU.tinytake.com/sf/MTQxMTgzOV81MDc2MDI2 I want to stick some text of the bottom of the page, like on the screen, just before footer always. When there is text (from mergefield), next should be new lines. I hope screenshot make it easier to…
SURU
  • 178
  • 1
  • 1
  • 11
3
votes
0 answers

MailChimp multi-language users data (merge fields)

How can I add auto-translation to MailChimp merge fields (users data)?
Yurii Kramarenko
  • 1,025
  • 6
  • 16
3
votes
1 answer

Replace MergeFields in a Word 2003 document and keep style

I've been trying to create a library to replace the MergeFields on a Word 2003 document, everything works fine, except that I lose the style applied to the field when I replace it, is there a way to keep it? This is the code I'm using to replace the…
willvv
  • 8,439
  • 16
  • 66
  • 101
3
votes
1 answer

How to add data into a Merge Field

I would like to automate printing invoices from a Word Template. I think I have the logic down but I just don't know the right way of coding it. Here is my current code Selection wrdSelection; MailMerge wrdMailMerge; MailMergeFields…
John Ernest Guadalupe
  • 6,379
  • 11
  • 38
  • 71
2
votes
1 answer

How to create a mergefield with a formula containing mergefields

I want to build mergefields that decide between the data coming from two different mergefields. For example «field_1» should contain: IF «field_1» > "" "«field_1»" "«field_2»" I tried it the following way: Sub createField() Dim mergeString As…
Schubidu
  • 195
  • 1
  • 15
2
votes
1 answer

Can I use a merge field in the "From Address" field of a Mandrill template?

I want to create Mandrill template that should use different "From Address"'es depending on dynamic data. Can I use a merge field for this? If not, how should I create a template with a dynamic "From Address".
Luca Boieru
  • 2,260
  • 4
  • 17
  • 15
2
votes
1 answer

Mailmerge dynamic hyperlink fields lost after save/reload of document - Word 2010

I have a problem where using dynamic hyperlinks in field codes works fine when I create a document, but when save and later reload it the links are replaced with text from the original recordset. The field code I am using is: { HYPERLINK {…
user2432995
  • 23
  • 1
  • 3
1
vote
0 answers

How to insert value with leading and trailing whitespaces into a Word merge field in Python docx-mailmerge

I'm trying to insert a string value that contains leading and trailing whitespaces into a Word document's merge fields using Python docx-mailmerge. However everytime I do this, the value in the Word file seems to delete that whitespaces. str_value =…
AB3
  • 67
  • 6
1
vote
1 answer

Merge fields won't show on visualforce page

I just started learning Apex recently, and there's still a lot of topics that are hard for me to navigate at this time. I've searched everywhere for a solution that works, but I still haven't been able to figure it out. I've created a button on my…
Mykid
  • 13
  • 4
1
vote
0 answers

MS Word INCLUDEPICTURE + MERGEFIELD Quick Parts don't update picture

I'm experiencing an issue with MS Word Quick Parts INCLUDEPICTURE and MERGEFIELD. I have a Word document which is linked to Excel worksheet "Data" though Mail Merge. This is the structure of the Excel workbook: [worksheet Data] | Entry | Nation |…
1
vote
1 answer

Dynamically add mergefields in existing docx-document

Is it possible to add mergefields to an existing .docx document without using interop, only handling with open SDK from CodeBehind?
Tenoda
  • 193
  • 2
  • 14
1
vote
0 answers

INCLUDEPICTURE use an alternate jpg if MERGEFIELD "filename".jpg is not valid

I keep track of hikes we do in an EXCEL spreadsheet. I use WORD to create journal pages using a lot of MERGEFIELDS. I have clean maps of parks. After we do a hike, I use an editor to draw a route on the clean map of where we hiked producing a route…
Jack
  • 11
  • 1
1
2 3 4 5