Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Word / Programming / August 2006

Tip: Looking for answers? Try searching our database.

Word 2003 - Automating Letter Template

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Birmangirl - 10 Aug 2006 10:49 GMT
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
Jezebel - 10 Aug 2006 11:38 GMT
Put a section break after the formfield section; protect only the first
section, and let the users do as they will in section 2.

>I have a letter template, complete with fillin fields for name/address,
> subject, salutation etc which all works fine.
[quoted text clipped - 7 lines]
> TIA
> Amanda
Birmangirl - 10 Aug 2006 11:55 GMT
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

> Put a section break after the formfield section; protect only the first
> section, and let the users do as they will in section 2.
[quoted text clipped - 10 lines]
> > TIA
> > Amanda
Greg Maxey - 10 Aug 2006 12:56 GMT
No.  Yuo would have to insert another section break after the free text
section.  I think a better approach would be a userform.

To get started, see:
http://word.mvps.org/FAQs/Userforms/CreateAUserForm.htm
> 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
[quoted text clipped - 21 lines]
> > > TIA
> > > Amanda
Birmangirl - 10 Aug 2006 14:46 GMT
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

> No.  Yuo would have to insert another section break after the free text
> section.  I think a better approach would be a userform.
[quoted text clipped - 26 lines]
> > > > TIA
> > > > Amanda
Doug Robbins - Word MVP - 10 Aug 2006 20:38 GMT
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.

Signature

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

>I appreciate your advice about forms; however, a couple of other questions
> before I go down that route:
[quoted text clipped - 54 lines]
>> > > > TIA
>> > > > Amanda
Birmangirl - 14 Aug 2006 14:16 GMT
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

> 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.
[quoted text clipped - 59 lines]
> >> > > > TIA
> >> > > > Amanda
Birmangirl - 14 Aug 2006 16:19 GMT
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

> 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
[quoted text clipped - 71 lines]
> > >> > > > TIA
> > >> > > > Amanda
Jay Freedman - 14 Aug 2006 16:57 GMT
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        FAQ: http://word.mvps.org
Email cannot be acknowledged; please post all follow-ups to the
newsgroup so all may benefit.

>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
[quoted text clipped - 80 lines]
>> > >> > > > TIA
>> > >> > > > Amanda
Birmangirl - 15 Aug 2006 08:53 GMT
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

> 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
[quoted text clipped - 102 lines]
> >> > >> > > > TIA
> >> > >> > > > Amanda
Jay Freedman - 15 Aug 2006 14:27 GMT
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        FAQ: http://word.mvps.org
Email cannot be acknowledged; please post all follow-ups to the
newsgroup so all may benefit.

>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
[quoted text clipped - 112 lines]
>> >> > >> > > > TIA
>> >> > >> > > > Amanda
Birmangirl - 15 Aug 2006 15:10 GMT
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

> 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
[quoted text clipped - 126 lines]
> >> >> > >> > > > TIA
> >> >> > >> > > > Amanda
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.