Word 2003 - Automating Letter Template

B

Birmangirl

I have a letter template, complete with fillin fields for name/address,
subject, salutation etc which all works fine.
When it comes to completing the body of the letter, I'd prefer NOT to use a
fillin field, but to perhaps automatically move the cursor to the correct
point once all fillin fields have been completed.
Is there another field I could use, perhaps witha bookmark?
Any suggestion gratefully accepted.

TIA
Amanda
 
J

Jezebel

Put a section break after the formfield section; protect only the first
section, and let the users do as they will in section 2.
 
B

Birmangirl

Thanks for the response. Will this still work if my fillin fields are all
over the place - they aren't conveniently all at the top of the letter
template; some of necessity have to be at the end of the letter.
I haven't set the template up as a form BTW.
Ideally, once all the fillin fields are popilated, i'd just like Word to
place the inswrtion point in the right place, ready to go - with no further
user intervention.

TIA
Amanda
 
B

Birmangirl

I appreciate your advice about forms; however, a couple of other questions
before I go down that route:

a) Our current template margins allow for a logo at the top on page one. If
the letter continues on to a second page, would it be possible to allow for a
different top margin on second and subsequent pages, i.e.
IF(totalnumberofpages>1,THEN add a section break and make the top margin for
section 2 = 1 inch,ELSE ignore).

b) Our Administrators each work for a number of users. They want to
customise their letterheads for each user. Is it possible to add each user's
template to a menu (either as an item or from a submenu)?

Sorry for all these questions but thanks everyone for the help so far.

Amanda
 
D

Doug Robbins - Word MVP

You don't need a section break. Make use of the different first page option
on the Layout tab of the File>Page Setup Dialog.

Have each user's template in their User templates folder.

--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP
 
B

Birmangirl

Everything is (almost) working and makes sense, except for Point 10) in the
UserForm FAQs. I have 7 named bookmarks - could someone clarify what should
be entered following the .Range_ instruction? I know this part is at fault in
my template, as the debugger highlights it...
Also, I have created a text box large enough for a recipient's name and
address in full for the letter. When I press Enter, the cursor advances to
the next field, not a new line. Do I need to create separate boxes for each
name/address line?

TIA and thanks for your patience and answers.
Amanda
 
B

Birmangirl

I believe I'm almost there. Instead of replacing the bookmark names with the
entered text, it is appending the text instead. This is a one-line sample for
one of the bookmarks - can anyone LMK what I'm doing wrong?

..Bookmarks("NameAddress").Range.InsertBefore NameAddress

TIA
Amanda
 
J

Jay Freedman

The code you have *always* inserts text in addition to whatever is
already in the bookmark. It works out ok if the bookmark contains one
space character and nothing else, because you usually want a space
after the inserted text. But if there's already text there and you
want to replace it, you have to use a different command,

.Bookmarks("NameAddress").Range.Text = NameAddress

Besides replacing the existing text, that command will also destroy
the bookmark. If you expect to need the bookmark afterward for
anything (such as replacing its contents again), you have to re-insert
the bookmark. See
http://www.word.mvps.org/FAQs/MacrosVBA/InsertingTextAtBookmark.htm
for sample code.

--
Regards,
Jay Freedman
Microsoft Word MVP
Email cannot be acknowledged; please post all follow-ups to the
newsgroup so all may benefit.
 
B

Birmangirl

Thanks for your response Jay - this has solved my problem :)
The only query I still have is the one of using one field for the full
name/address. If I use separate fields, I'll have the issue of having to
suppress blank lines.
If this is the only way around the problem, then so be it - but if there's a
better way, I'd love to know...

TIA
Amanda
 
J

Jay Freedman

Sorry, I didn't read the quoted message preceding the one I responded
to, and missed the question about Enter in a text field. Again, the
answer is simple: In the userform editor, select the text box. If the
Properties pane isn't visible, press F4 to display it. Find the
EnterKeyBehavior and MultiLine properties and set both of them to
True.

--
Regards,
Jay Freedman
Microsoft Word MVP
Email cannot be acknowledged; please post all follow-ups to the
newsgroup so all may benefit.
 
B

Birmangirl

Thank you Jay for the last piece "of the jigsaw" - everything is working
perfectly now and at last I can put this template to bed :)

Cheers
Amanda
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top