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

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.

Related

how to create table of content from character based style in MS Word 2013?

I have MS Word document which i used manually defined style named S11 "based on characters". Now i want to make table of content using text with S11 style.
I had created table of content using "paragraph based" style using predefined and also manual styles before.
But now when i want to create table of content in the "table of content option" dialogue box, I only see the paragraph based styles to choose from.
I don't want to use paragraph based style for my text because it applied to whole paragraph and i want some text within normal paragraph to be in S11 text.
for example you can think of some proverb that I used in content of a thesis and at the end of thesis i want to have list of all proverb used in the thesis and the page that I used them (I styled the proverbs in S11 style to bold them from normal text inside the content).
Is ther any way?

How do I get OpenOffice Writer Combo boxes to display multi-line text?

I am developing an OpenOffice Writer template that can be used to fill in reports for a child-care centre.
There are some standard outcomes, comprising long sentences, and I want the user to be able to select the appropriate sentence from a combo box. I have entered the sentences into a table in Openoffice Base database, which is then connected to a series of combo boxes in a Writer template. However, when the user choose an option that contains a very long sentence, only the text up to the length of the combo box is visible.
What I want to do is have the selected value of the combo-box wrap over several lines when selected so that all the (very long) text appears in the selected box when the user chooses a long sentence from the combo.
I have been looking through the properties of the combo box control, but have yet to identify one that will allow the selected value in the combo box to word-wrap (so that I could make the combo-box several lines in height such that the entire sentence would fit into the box).
Any pointers on how I could do this would be much appreciated.
thanks,
David.
Thanks Jim K, that was helpful. In the end, what I wound up doing was creating a textbox which I named "selectedOutcomeATextBox" immediately below my combo box which was named "OutcomeCombo".
I then attached the following macro code to the textModified event associated with the "selectedOutcomeATextBox":
Sub UpdateOutcomeA
Dim Doc As Object
Dim Form As Object
Dim Ctl As Object
Dim newCtl as Object
Doc = ThisComponent
Form = Doc.DrawPage.Forms.GetByIndex(0)
Ctl = Form.getByName("OutcomeCombo")
newCtl = Form.getByName("selectedOutcomeATextBox")
newCtl.Text = Ctl.Text
End Sub
I also set the "Printable" property of the "OutcomeCombo" to "No", so that when the document prints, the combo box itself does not appear on the printed page, but the "selectedOutcomeATextBox" textbox which has had its value set by the macro when I choose a value from the combo box does appear with the desired text. I also set the "TextType" property of the selectedOutcomeATextBox" text box to "Multi-Line", so that extra long text will wrap to the next line, thereby showing the very long strings that are stored there.
Thanks heaps Jim K.
cheers,
David Buddrige
Apparently combo boxes do not have the MultiLine attribute. The question was asked a few years ago here but was not solved.
One alternative that requires some macro programming is to use a single multi-line text field and then make a scroll bar button that changes the choice. Instead of a scroll bar, two buttons could be used to change the choice (Previous / Next), or even a list box control. Using a list box control in this way would have the advantage that they could see all the choices at once, like a combo box.
Another approach is to break up each sentence and display the parts across several lines of a list box. Then when one line is clicked, all the lines of a sentence are selected at once, using an event listener for the list box. This could be shown in addition to an ordinary editable multi-line text box, in case none of the answers in the list are wanted.
One more idea: Radio buttons can have multiple lines, so dynamically show radio buttons, one for each sentence. A dialog window could be displayed to hold the radio buttons. The result of the dialog would be used to fill the multi-line text field.
Or you could just live with the truncated sentences. Maybe it would help to make the control a little wider, or abbreviate the sentences.

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 watermark visible on the document? I am using Microsoft Word 2013. Thanks in advance for your help guys.
{ IF"{MERGEFIELD SampleField}"="Yes" "DRAFT" "" }
Yes, it's possible, with the caveat that you can't use Word's built-in Insert/Watermark functionality. An "If" conditional can work only with textual content. Word's built-in Watermarks are "WordArt" - which places an object in the document.
But you can use the Text Box drawing tool (as in Insert/Text Box/Draw Text box) to create the "container" for the watermark text in the document Header. It can be positioned anywhere on the page; make sure you set the text wrap formatting to "Behind text".
Insert the If field into that, with the nested mergefield and conditional statement. You need to type the watermark text and format it the way you want to have it.
The correct format:
{ IF { MERGEFIELD PrintCopy = 1 "ORIGINAL" "COPY" }}
Add spaces before and after the equal sign
Make sure the entire row (text above) is highlighted in grey when you click on it in the word document, otherwise it is only text once merged.

Placeholders in Microsoft Word 2013

I'm trying to create something whereby I can enter text once and then display that text back in other places in my document. What I'm hoping is that if I edit the first instance of the text, the other references of it would update as well.
You can do that with Word "content control databinding"; put both references in a bound content control pointing to the same XML element.

How to handle variable width FieldObjects in Crystal Reports

I have a Crystal Report which is viewed via a CrystalReportViewer control on an .aspx page (using VS2008).
The report has two data-driven FieldObjects (which can contain a variable number of chars) which I would like to display on the same line beside each other.
Problem is when the text in the first FieldObject is too long it overlaps the text in the second FieldObject.
I have tried setting the 'CanGrow=True' and 'MaxNumberOfLines=1' on the first FieldObject to 'push' the second FieldObject further to the right, but this didn't work.
How do I get the second FieldObject to always display immediately after the first FieldObject regardless of the length of the text in the first?
Cheers in advance of any knowledge you can drop.
you can add a text object to the report. And while editing the text of the text object, drag the field you want to show from the object explorer into the text box. Then hit space, then drag the second field in to the same text box. Your two fields will always be one space a part. You could, of course, add more spaces or any other text you want.
Or you can create a function which returns field1 + " " + field2 and add the function to the report.