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

field codes

ResolvedVersion 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:

Change line spacing using shortcuts

If you want to change line spacing using the keyboard press
CTRL + 1 - Normal
CTRL + 2 - Double line spacing
CTRL + 5 - Line and half spacing

View all Word hints and tips

Connect with us:

0207 987 3777

Call for assistance

Request Callback

We will call you back

Server loaded in 0.09 secs.