How to generate a barcode from a field in word template? - ms-word

I work with MS Dynamics CRM 365 and I try to make a word template. The word template will display some field value. Each of my record have an ID, this ID is store in a field(this field is called ticketnumber) and I want to change the value of this field to a barcode.
I try to follow a tutorial but it doesn't work because the barcode return "ticketnumber" when I scan it. I only use word tool to do it.
I use this code in plain text format area:
{ MERGEBARCODE "ticketnumber" \a \t CODE128 }
{ DISPLAYBARCODE "ticketnumber" CODE128 \t \h }
{ { DISPLAYBARCODE "ticketnumber" \a \t CODE128 } }{MERGEBARCODE "ticketnumber" CODE128 }
Here's the result of my code:
It show a barcode, but when I scan it, the result of the scan is "ticketnumber", but should be "SCFR000129". How can I fix this ?
And I have another request, if it's possible, how can I delete the "ticketnumber Code 128" above the barcode and if it's possible how can I have the ticketnumber write below the barcode ?

try this font Free 3 of 9 Extended Regular
it solved similar problems to me, but keep in mind to maximize your font size

Related

How to autoupdate an MS word field based on typed text?

Is there a way to automatically update the content of a word field based on a text I type?
i.e. I have a table with two cells. The left cell contains a QR Code generated by
{ Displaybarcode "Just a Text " QR \s 40 \t }
The rigtht cell contains "Just a text"
Is there a way to update the QR code (actually a word field) based on what I type in the right cell?
So, if I change the text to "I just changed that text!"
I would get this:
I do not mind pressing Ctrl-F9, but I would not want to edit the field itself.
Is that possible?
Dan
I would put the area for the text in a mapped Content Control and use a copy of that control in the DisplayBarCode field as the text portion. The field would need to be updated.
Here is another Add-In to produce Mapped Content Controls by MVP Graham Mayor.
Here is a video by Laura Townsend on how to do it yourself.
Here is the Walkthrough page on mapping to an XML part from Microsoft.

JasperReports and Microsoft Word - justified text align

I have jrxml report, which gets exported into .docx format,
I have static text resources (.properties) with "\n" or "<br>" signs in values, like so:
In jasperreports 'preview' tab it looks ok:
But when .docx format is used...:
I figured out that when you paste pilcrow/paragraph (by pressing enter key) in word itself,
justified alignment works ok,
but with <br> or \n jasper inserts new line (shift enter equivalent) and it breaks everything.
May be someone knows what could be done.
Thanks!
Found the solution:
To brake row I use tab/newline ( <br> via HTML or \t\n via Java),
Text before tab/newline is aligned to the left border, text after is still justified well along the page.

Microsoft Office Word 2016 mail merge custom invalid recipement for greeting line

I have a list of emails and some are for company names and others have first name last name. If I include the greetings line for "hello first_name last_name" it works but I want it to say "hello company_name" if there is no first name. Is there a way to do this?
To place this logic into your mail merge I suggest forgoing the Greeting Line and instead nesting Merge Field Codes inside a Word If, Then, Else statement. Field Codes are invisible markers and logic that Word replaces with text when needed.
Important Note: Do not copy and paste the below code into your mail merge main document. The curly braces { } in the code are generated by typing CTRL-F9 in your Word document. Generating these braces in this manner tells Word that this will be a Field Code. As such you will need to type the below code using CTRL-F9 to generate these braces when needed.
Important Note 2: Field Codes are invisible unless the document is toggled to display them. ALT-F9 will toggle your document to hide field codes (so you can test the merge) or display them (so you can edit the code).
Word's IF statement, which is itself placed within Field Code braces, has the syntax If test is true, then true, else false. Word uses spaces to separate the test, true, and false sections. It also requires that the true and false outcomes are enclosed in quotation marks. All Field Codes are enclosed in curly braces (CTRL-F9).
Place the following code between the opening text (for example, "Dear") and closing punctuation (comma or colon).
{ IF { MERGEFIELD Last_Name } = "" "{ MERGEFIELD Company_Name }" "{ MERGEFIELD First_Name } { MERGEFIELD Last_Name }"}

Putting Tabs in a Mail Merge Field

I use MailMerge with CSV file. The below is the format of CSV file.
SerialNo PledgeList
1 0001\t100\t200
So, my value PledgeList field includes \t .
So, Header Record Delimiters Dialog appear to choose field delimiter manually. I have to choose field delimiter manually when opening mailmerge document. So, I would like to know how to do not to appear Delimiter Dialog Box to choose field delimiter manually
Sample letter format is the following
«PAWNERNAME»
«ADDRESS»
Dear «PAWNERNAME»,
«PledgeList»
Yours Sincerely,
I want to include the Tab {PledgeList} in the below data
0001 TAB 1000 TAB 2000
This is a known problem described in a Microsoft Knowledge Base article:
https://support.microsoft.com/en-us/kb/189014
In a nutshell, the solution is to duplicate the Headers line in the CSV file. This confirms the delimiter for Word and should suppress the dialog.
SerialNo PledgeList
SerialNo PledgeList
1 0001\t100\t200
HOWEVER: Word will not automatically interpret \t as a tab sign. It will insert the literal text. You'd need to perform a Find/Replace on the mail merge result. It might be better if you format your data as follows, where the space in the PledgeList is a tab character (ANSI 9):
"SerialNo" "PledgeList"
"SerialNo ""PledgeList"
"1" "0001 100 200"

How to select and modify all caption fields at once in a Word document?

I have been trying to change the numbering style of my figure and table captions. All of my headings are in Roman numerical. However, I want Arabic numerical in my caption numbering. Could anyone tell me an easy way to do it at once? Below is an example:
Heading title: "Chapter V". My captions appear as "Figure V-2". However, I want them to appear as "Figure 5-2"
Also, is there any way I can select all figure caption fields at once and edit their field code?
To change in one caption: Press Alt-F9 and remove \* ARABIC .
Ctrl+A, F9 to update fields.
Now to change in all captions: try with a search and replace (Ctrl+H) to replace SEQ Figure \* Arabic \s 1 with SEQ Figure \s 1
To modify all field codes, you could use search & replace or you can modify field codes in VBA this way:
Sub ChangeAllFields()
'does not process headers/footers
Dim oFld As Field
For Each oFld In ActiveDocument.Fields
fld.Code = Replace(fld.Code, "SEQ Figure \* ARABIC \s 1", "SEQ Figure \s 1")
Next oFld
End Sub
When you insert captions from now on, change the numbering in the dialog box that pops up. I think you'll have to change it every time, because Word (correctly) defaults to matching the Roman numerals in your chapter headings to Roman numerals in your captions. If you want to be abnormal, you'll have to change from the default every time you insert a caption, or change them all using one of the methods from Toon Flores.
p.s. I said "abnormal" because every style manual I've ever seen would frown on what you are doing.