Page 1 of 2 12 LastLast
Results 1 to 15 of 18
  1. #1
    5 Star Lounger
    Join Date
    Jan 2001
    Location
    Jacksonville,NC, USA
    Posts
    705
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Word form line count (Word 2000)

    I am hoping someone can help me. I am going to attach a portion of the multi-page report that I have been beating myself up over for several weeks now. I have two Narrative sections in this report. A JPG image is in the background only for practical purpose when printing, so it looks like it was printed on actual lines. I've set the spacing up in these Narratives to work with the JPG lines in the background and that seems to work okay. My problem is, How do I make the user stop typing when they get to the bottom of the last line in the Narrative? If they keep typing, they push the rest of the report, (anything past the narrative), down, and ruins the rest of the report. I will have some people typing in CAPITALS, and I will have some people typing in lowercase. So putting a word count on the form field is not an option. What I was wondering was: Could I assign a macro to the Narrative form fields to make the user stop typing, say...after the 16th line (if that happened to be the last line in the JPG image, just an example)...or a line of code to the form field stating that they could type until the text wrapped 16 times. If you could give me some good feedback, and help me with a bit of VB, I'd be eternally grateful.

    Thank you,
    Nannette M. Padgett
    Attached Files Attached Files
    NMP <img src=/S/cool.gif border=0 alt=cool width=15 height=15>

    If you can't convince them, confuse them. - Harry Truman <img src=/S/scratch.gif border=0 alt=scratch width=25 height=29>

  2. #2
    Super Moderator jscher2000's Avatar
    Join Date
    Feb 2001
    Location
    Silicon Valley, USA
    Posts
    23,112
    Thanks
    5
    Thanked 93 Times in 89 Posts

    Re: Word form line count (Word 2000)

    Note: I haven't opened the document, and I don't know anything about macros on form fields...

    One common way to discourage, although not actually prevent, people from typing too much in a field is to put it in a table cell with a fixed row height. If you think that your users would take the hint and not enlarge the cell, that might be all you need.

  3. #3
    5 Star Lounger
    Join Date
    Jan 2001
    Location
    Jacksonville,NC, USA
    Posts
    705
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Word form line count (Word 2000)

    Can't do it. If I put it all into a table cell, then you can't see the JPG image in the background that is needed at Print time, to make it look like they actually typed on line rows. The table and JPG can't be ordered like other objects. A frame can't be ordered either. Thanks for the feedback jscher2000. Anybody else have ideas? A bit of code on the form field is what I'm looking for. Code that will make the user stop typing after 16 line wraps. Anybody?
    Nannette
    NMP <img src=/S/cool.gif border=0 alt=cool width=15 height=15>

    If you can't convince them, confuse them. - Harry Truman <img src=/S/scratch.gif border=0 alt=scratch width=25 height=29>

  4. #4
    4 Star Lounger
    Join Date
    Dec 2000
    Location
    Faifax, Virginia, USA
    Posts
    542
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Word form line count (Word 2000)

    This is a guess at an approach, because i've not done this myself.

    How about using a form field? While the default size is "unlimited", you can set the maximum size to something that you can determine by typing in a bunch of capital Ws.

  5. #5
    5 Star Lounger
    Join Date
    Jan 2001
    Location
    Jacksonville,NC, USA
    Posts
    705
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Word form line count (Word 2000)

    Thanks for the reply Peter, but have already gone that route. Did do the character count, and used all W's. When the proofer got hold of it, he said it wouldn't do. When those who type all in lower case come along and fill in the Narrative field, then it only fills up half the narrative section, and would look to silly only typing in half the narrative section and then jumping to the second narrative section to do the same thing. If there was a way to make everybody type in "sentence case", that would be IDEAL. Is there? Anybody else out there want a "whack" at this one....I'm on my second bottle of tylenol.. <img src=/S/hairout.gif border=0 alt=hairout width=31 height=23> Appreciate all the input. Truly do.
    Nannette
    NMP <img src=/S/cool.gif border=0 alt=cool width=15 height=15>

    If you can't convince them, confuse them. - Harry Truman <img src=/S/scratch.gif border=0 alt=scratch width=25 height=29>

  6. #6
    Super Moderator
    Join Date
    Aug 2001
    Location
    Evergreen, CO, USA
    Posts
    6,623
    Thanks
    3
    Thanked 60 Times in 60 Posts

    Re: Word form line count (Word 2000)

    I don't normally follow this forum, but I stumbled into it via VBA and got intrigued.

    It seems to me that what your are proposing would be pretty fragile - you've already discovered some situations which cause problems. Suppose someone didn't like the font you chose, or didn't have it available on his PC, and Word started substituting fonts. In general, I think you will have an awful time making the lines line up with the text. I would probably do this with a dialog form in Word, where I could control the maximum amout of text a user could type in. Another way to approach this might be to put the Signature lines in the first page footer of the template. Then if it spilled over, it would simply run the narrative onto a second page. As to switching things to Sentence Case, you should be able to do that with VBA. It would mean setting a range to the narrative area first and then applying the .Case = wdTitleSentence.

    Since I tend to work with Access most of the time, I would probably approach this as an OLE Automation project, and capture the data in Access, and then create a report in Word that met the desired requirements. And I would do the "lines" using the Underline format in Word - I know that wouldn't look exactly like the report they used to do with a typewriter, but isn't it nicer? Yes, I know the user is always right. Hope this gives you some ideas.
    Wendell

  7. #7
    Uranium Lounger
    Join Date
    Dec 2000
    Location
    Los Angeles Area, California, USA
    Posts
    7,453
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Word form line count (Word 2000)

    Hi Nannette:
    Why can't you put it in a table? What you do is insert a 1 row table & give it an exact height (I got about 3.9 inches). Then put your graphic in the document & drag it over the table. You have to fiddle with it a bit. I've played with it a little & attached it here. You still might need to adjust it more. Let us know how this works out.
    Attached Files Attached Files

  8. #8
    4 Star Lounger
    Join Date
    Dec 2000
    Location
    Faifax, Virginia, USA
    Posts
    542
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Word form line count (Word 2000)

    As Wendell mentions, "Time to try a different app".

    I would try Publisher next. It allows text input as long as there is room, then it stuffs the text into a buffer, and asks "do you want to overflow to the next page?"

    Sounds more like what u r doing than anything else i've heard.

  9. #9
    5 Star Lounger
    Join Date
    Jan 2001
    Location
    Jacksonville,NC, USA
    Posts
    705
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Word form line count (Word 2000)

    If I put it into a one cell table, then you must press Enter at the end of each line or the table grows with you, and you end up typing outside the right edge of the paper. And if you continue typing at the bottom of the screen you don't (and this is good) see the form push anything down this time thank heavens, but you don't see anything you may have typed in that cell either, because you can keep typing on and on, and on, though your just not seeing it. I'm trying to keep in mind, and the proofer is as well, how most of these reports may be typed on a laptop, in a dimly lit car at 5:00 in the morning. Trying to make it easy as possible here for no errors to occur. All your ideas are swell, but am kindof looking into what Wendall suggested with the code on entry of this form cell for narrative. I did try his .Case = wdTitleSentence piece of code, but am missing something in it, to make it work. I know I can't be off far here...thanks for the help
    NMPadgett
    NMP <img src=/S/cool.gif border=0 alt=cool width=15 height=15>

    If you can't convince them, confuse them. - Harry Truman <img src=/S/scratch.gif border=0 alt=scratch width=25 height=29>

  10. #10
    5 Star Lounger
    Join Date
    Jan 2001
    Location
    Jacksonville,NC, USA
    Posts
    705
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Word form line count (Word 2000)

    Wendell,
    This is a template, and will be installed onto patrol cars that are ensured to have the font that the template calls for. The only problem I'm having with your code however is, when I apply it to the onentry event of the narrative form field, and then try to use it, it says there's something wrong with it. Invalid or unqualified reference. You mentioned specifying a range first. Is that something I'd have to say in code before the .Case = wdTitleSentence line? I've tried changing this code to Is Case = wdTitle Sentence and it still doesn't work. Any advice here? And PS...the proofer will not allow spillover, but that was a great idea. NMPadgett
    NMP <img src=/S/cool.gif border=0 alt=cool width=15 height=15>

    If you can't convince them, confuse them. - Harry Truman <img src=/S/scratch.gif border=0 alt=scratch width=25 height=29>

  11. #11
    Super Moderator
    Join Date
    Aug 2001
    Location
    Evergreen, CO, USA
    Posts
    6,623
    Thanks
    3
    Thanked 60 Times in 60 Posts

    Re: Word form line count (Word 2000)

    Actually, I think Phil is right on the idea of putting it into a fixed height cell in a table. In that environment, the cell will never grow, and when they get to the end, I believe the text starts to scroll. If you do put it into a table cell and let it grow, it will simply pop onto the next page - would that be a disaster? (I guess you are saying the proofer thinks so!) In any event you want to put the signatures in a footer on the bottom of the first page - you can make the first page footer different so you don't get it on the bottom of every page. It would appear that you are dealing with someone who has always typed their reports on a typewriter, and can't fathom how something is going to work in another environment. That's always a challenge.

    As to the code, yes you do need to set a range or a selection before you can use the code to set the case. The subject of setting ranges is probably more complex than can be readily described here. The help files are of some value, but don't tell the whole story either. Try searching this forum for Range and see what you find. You might also look at the MS knowledge base and the Word MVP FAQ site as documented by Charles Kenyon. And there's always books. Can't suggest any for 2000, but perhaps someone else can.
    Wendell

  12. #12
    5 Star Lounger
    Join Date
    Jan 2001
    Location
    Jacksonville,NC, USA
    Posts
    705
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Word form line count (Word 2000)

    UNCLE
    I can not I guess explain with enough importance or emphasis on the fact that this form cannot be pushed this way or that by a unruly form field. These reports go in front of a Judge, and can be thrown out for the least little glitch, I think we've all an understanding on the ease in which a lot is thrown out of a courtroom on a technicality. So, the tables not going to work because they could keep typing, and lose half of an important sentence (without being aware of it), behind the wall of the table. Remember that this is large report and I only sent you a portion of it to view. Nothing can be pushed to another page, or its no good anymore. I will keep looking for the line of code I seek, in which can be applied to the OnEntry event in the Narrative Form Field properties. Right now, all I have is a piece of code in the onentry box that warns the typer not to type past the 16th line. It doesn't keep them from doing it. Keep in mind (from some of the comments I received), that yes...some people are used to the old typewriters. Some people are new to using computers and this type of form. Thats why its important to try and make it as easy and unruly for them as possible. A law enforcement officer may have to type "many" of these a night, and was trying to make it as user freindly as possible, without having to make difficult strikes in any part or portion of it that they might have to work around. i appreciate the time, the effort, the replies, but will have to continue to search here. I know there is a line of code somewhere, that will stop the typing at a certain line count. If it can't stop a character count, it can stop a line count...I pick up my VBA books, and I continue to pound head on them.
    <img src=/S/brickwall.gif border=0 alt=brickwall width=25 height=15>
    NMP <img src=/S/cool.gif border=0 alt=cool width=15 height=15>

    If you can't convince them, confuse them. - Harry Truman <img src=/S/scratch.gif border=0 alt=scratch width=25 height=29>

  13. #13
    4 Star Lounger
    Join Date
    Dec 2000
    Location
    Faifax, Virginia, USA
    Posts
    542
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Word form line count (Word 2000)

    Ok, it has to be word...

    how about talking to the cops, and ask them what they think? they're the ones who'll be using it, after all.

  14. #14
    Super Moderator
    Join Date
    Aug 2001
    Location
    Evergreen, CO, USA
    Posts
    6,623
    Thanks
    3
    Thanked 60 Times in 60 Posts

    Re: Word form line count (Word 2000)

    Oh boy! I understand the complications you are trying to deal with. Some of our clients are lawyers, and issues like this frequently come up. It looks like you are in a box, so .....

    How about setting the font to a fixed with font, rather than porportional? Doing that lets you determine with some degree of accuracy how many characters the form will hold. Probably Courier New would be the best choice. Then the trick is to determine when you have exceeded the length of a line, and at that point programatically insert a paragraph mark. At that point you also start counting paragraph marks, and when you get to 16 you warn them they are on the last line. And when paragraph 16 gets full, you say that's it. Timing is an issue here - do you let them edit at that point and delete words, etc in order to be able to go on? Or do you let them type what they think they want and then apply the formatting afterwards, and warn them they have exceeded the maximum length. I do so little VBA in Word that I'm not of much help in the details of how best to do this. I'll see if one of the Word VBA gurus can help here.
    Wendell

  15. #15
    Platinum Lounger
    Join Date
    Dec 2000
    Location
    Queanbeyan, New South Wales, Australia
    Posts
    3,730
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Word form line count (Word 2000)

    Two vague thoughts- probably not worth much, but it looks like straw-clutching time.

    1. Enter data in a pop-up user form. Then try to insert the data in a form (even into a form field?). You could check the top position of the start and end, and issue a message if it's too long.

    2. Embed a textbox from the control toolbox into the form. You can control events much ebtter that way- but it's not without problems. And ir probably won't solve your picture problem.
    Subway Belconnen- home of the Signboard to make you smile. Get (almost) daily updates- follow SubwayBelconnen on Twitter.

Page 1 of 2 12 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •