I hope I can clearly explain this.
I have a report template that I am building. The client want to make it
gender specific i.e based on the sex of the person i.e. he/she. Currently I
use a drop down menu with he/she himself/herself etc. I was wondering if
anyone has had a similar scenario and can suggest an easier way to do this as
there are more than 20 places in the document where this would be required.
To further complicate things. I have multiple areas in the template where
there are drop down menus that based on the choice it will insert an autotext
of information which then has the need to insert he/she etc. through the
paragraph.
In numeric terms there are approximately 10 instances where there are 5
choices of information that could be inserted. Basically the template has
multiple variables that each have variables within them.
I am hoping for some guidance on the best way to do this programatically. Or
for someone to say "you have bitten off more than you can chew".
Thanks in advance
Susan
Seems an awful lot of work for a small return.
Approach 1: Without telling the client, re-word the document so the problem
simply doesn't arise. If the form is directed at the person, write it all in
the second person (you, yourself, etc); otherwise use 'they', 'them', 'the
recipient' etc throughout.
Approach 2: Use 'he/she', 'himself/herself' in the dropdowns etc; then use a
macro on completion to Find and Replace as needed.
Probably best to avoid the entirely non-gendered "s/h/it" approach.
>I hope I can clearly explain this.
>
[quoted text clipped - 24 lines]
>
> Susan
Susan B. Quinn - 17 Aug 2006 04:53 GMT
I agree totally and feel I have promised more than is possible.
Approach 1 is unfortunately not available as they need it to be personal -
it is a psychologocial report.
Thanks anyway.
> Seems an awful lot of work for a small return.
>
[quoted text clipped - 36 lines]
> >
> > Susan
Hi Susan,
This is perfectly possible, but does require a bit of work.
First of all, write the text in the template so that it is all male.
Next, you need to define all the gender/specific word pairs that you want to
handle, e.g. he/she, him/her, his/hers.
Then in the template go to File, Properties, click the Custom tab and insert
a property for each word pair, with both the name and value set to the male
version. So you would have a property called "he" whose value is also "he".
Then, find every example of the "he" in the document and replace it with a
DOCPROPERTY field referencing the "he" custom property. Do the same for each
of the other properties you have defined.
Then create a UserForm, where the user can choose the gender. If the user
chooses male, then you can leave all the properties with their male values.
If the user chooses female, then the code in the form sets the values of all
the custom document properties to their female values. So, for instance you
would set the value of the "he" property to "she".
Then the code updates all the fields in the document so that the display
matches the property values.

Signature
Regards
Jonathan West - Word MVP
www.intelligentdocuments.co.uk
Please reply to the newsgroup
Keep your VBA code safe, sign the ClassicVB petition www.classicvb.org
>I hope I can clearly explain this.
>
[quoted text clipped - 24 lines]
>
> Susan