Results 1 to 18 of 18

Thread: Need help with VB to quickly populate a letter

Threaded View

  1. #1

    Thread Starter
    New Member
    Join Date
    Jan 2010
    Posts
    9

    Question Need help with VB to quickly populate a letter

    UPDATE: See my 2nd post below to see my first stab at coding

    Firstly, I apologise if any of this has been covered before - I tried a search but my query is rather specific so I thought I would post and see if anyone can help!

    Just as background - I am familiar with recording Word macros and back when I used to have Word 1995 I used to know how to use dialog editor to create custom dialog boxes to make certain tasks happen. I am not familiar with VB but I have been dabbling to learn my way around.

    The task I am trying to automate is the population of a letter. I use a template letter to send to customers but there are many sections which need to be adapted for the particular customer. What I envisage happening is having a dialog box with lots of checkboxes. Depending on what checkboxes are ticked, the letter is populated with the correct info. The most basic example would be a check box for male and one for female (thus inserting he or she through as appropriate) or a check box for me or my collegaue (thus inserting my name at the end or hers).

    I assume that the best way to proceed is using fields for the blanks throughout my letter.

    I have dabbled with the userform and created a dialog box with loads of checkboxes which can be ticked (obivously I don't want male and female to both be ticked (perhaps an option button would be better).

    Anyway - does all of this sound do-able? Is there a better way of doing this which doesn't use fields?

    Does anyone have some example code they could provide me so I can play with it?

    If anyone can give me tips or assistance with this it would be greatly appreciated

    EDIT: I forgot to say - I am playing around with Word 07 but the PCs i intend to use it on run Word 03

    EDIT: Further thoughts - I could avoid using fields/forms and have the letter with [NAME] at the end and have a "jarv" checkbox use Autocorrect to replace NAME with "jarv". Does this seem more sensible? I suppose I could also use checkboxes to insert entire paragraphs in my letter
    Last edited by jarvster; Jan 30th, 2010 at 06:21 AM. Reason: extra fact

Posting Permissions

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



Click Here to Expand Forum to Full Width