field codes

Public Schedule Face-to-Face & Online Instructor-Led Training - View dates & book

Forum home » Delegate support and help forum » Microsoft Word Training and help » Field codes

Field codes

resolvedResolved · Medium Priority · Version 2003

Vicki has attended:
No courses

Field codes

Is it possible to combine a FILLIN and an IF code (or something which would give a similar result)?

I'd like the user to manually enter a salutation ("Sirs"/"Mr Smith") after the word "Dear" and then have "Sincerely" or "Faithfully" come in after the "Yours" as appropriate.

The letter template will not be linked to a database.

I did wonder whether AUTOTEXTLIST might be the answer but didn't know how to code the Sincerely/Faithfully to come in correctly.

Thanks

Vicki

Edited on Thu 4 Dec 2008, 10:23

RE: Field codes

Hi Vicki

Thanks for your question. Apologies for the delay in getting back to you. I've been looking for ways of making this work. A simple way would be to create an auto-correct entry that puts both the salutation and the signature block in at the same time. Type in the Dear Sir and Yours Sincerely highlight them and from Insert choose Autotext > Autotext.. Repeat the process with the second version of your Salution and close.

Now when you begin to type Dear Sir Word will offer to insert the entire block. You can then type your letter between the opening and closing text.

If your document is a template and already contains text the auto-correct method won't work.

The only other way I can see so is to write a macro that checks the value of the fillin and triggers a change in a book- mark field that contains the appropriate sign-off at the end of the letter. Unfortunately it is outside the scope of the forum to produce code but you might be interested our VBA training. Our public schedule Excel VBA course whilst not directly related to Word would give you a good understanding of how VBA works in relation to an Office application. You can find out more here
Excel VBA training

I hope this helps - do let us know if you have any further questions.

Kind regards,
Andrew

RE: Field codes

Thanks for this, I'll give a try. I managed to cobble something together using a mixture of ASK REF & FILLIN but it's a bit fiddly.

I'd like to do the Excel VBA course, something for the New Year if my company are feeling generous!

Regards

Vicki

 

Training courses

 

Training information:

Welcome. Please choose your application (eg. Excel) and then post your question.

Our Microsoft Qualified trainers will then respond within 24 hours (working days).

Frequently Asked Questions
What does 'Resolved' mean?

Any suggestions, questions or comments? Please post in the Improve the forum thread.


 

Word tip:

Check The Text Style Used

For people who use styles there is a quick way of checking which style has been used on text.

Press Shift-F1. The cursor turns to a question mark and pointer.

Click in the text you want to know about and Word opens the 'Reveal Formatting' task pane showing all the information on the style (its font, formatting and so on).

View all Word hints and tips


Server loaded in 0.1 secs.