Results 1 to 3 of 3
  1. #1
    2 Star Lounger
    Join Date
    Jun 2002
    Posts
    122
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Efficient VB (VB/Word 2003)

    Hi All,

    I'm creating a letter template for users (sample attached) and need a bit of efficient vb for a certain scenario. I need to ensure that the date field remains at the same position in the document in order that it doesn't appear in the window area of our envelopes. The address must always begin at the "add" bookmark and I have a maximum of six lines to use.

    On frmltr, chkprivcon may be true or false. If false, nothing is inserted but the blank line remain must in the document. As mentioned, the address must always start at the "add" bookmark. On frmltr, the "name", "company", "address1", "address2", "address3", "city & postcode" text boxes could: all be populated; all be unpopulated; or be populated randomly according to the address details a user might have. In the document, however, the address lines must have no gaps (e.g., if the "company" text box is empty then the text in "address1" text box must appear directly under "name").

    I could easily insert an "endadd" bookmark and insert a blank line after that in the document to compensate for any of the text boxes that aren't populated, but my boss wants something tidy using strings etc., and it needs to be turned around quickly (big project). Hope someone can help!

    Thanks,

    Violet
    Attached Files Attached Files

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Efficient VB (VB/Word 2003)

    I'd use a single-cell table with a fixed height (i.e. row height set at "Exactly") and transparent border for the address. That way, it doesn't matter how many lines the address occupies.

  3. #3
    2 Star Lounger
    Join Date
    Jun 2002
    Posts
    122
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Re: Efficient VB (VB/Word 2003)

    I toyed with that very idea earlier but it seemed to easy to be true. Thanks, I'll go and put it into practice now!

    Violet

Posting Permissions

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