PDA

View Full Version : Letter Template for Business Divisions



megzzz
05-11-2013, 05:56 PM
Hi,

I am relatively new to VBA so please bare with me.

The company I work for has multiple business divisions and each business has multiple branch locations.

The letter template needs to allow the user to select their business division in a combobox in a userform which will populate that field in a table in the footer.

I then need to populate the address and contact details, also contained in a table in the footer. I would like this information to be pulled from an excel spreadsheet which will allow for updates by administrators who may have very basic level knowledge of Word. The other option, I believe, is to use docvariables, but I am unsure of how they work. I can only assume that the information is manually entered into the userform and that the document remembers the information?

Any assistance is greatly appreciated. Thank you in advance.

macropod
05-11-2013, 11:26 PM
Your approach is not one I (or some of the other contributors here) would advise. See the discussion here: http://www.msofficeforums.com/word-vba/16680-contact-details-entered-based-multiple-drop-down.html

fumei
05-12-2013, 03:36 PM
Indeed. From Paul's post in that other thread:

Indeed, it could be managed via a single template that simply references the division/branch-specific data in an external file (eg via an INCLUDETEXT field),

Assuming people do not bounce around positions a lot, you could maintain one reference file with all user's division\branch. One template could then pick up the current user login name and get the appropriate branch (and any other information) from that reference. It would then insert whatever is needed.

It is just data, and I do not see a real need for ANY user selection.