Addy was telling us:
Addy nous racontait que :
I've got it so that it puts the whole address in the dropdown box but
I really only want the company in the dropdown box and the full
address to be added to the letter. I added it by putting:-
For Each oAutotext In oTemplate.AutoTextEntries
.CBOAddress.AddItem oAutotext.Value
rather than
For Each oAutotext In oTemplate.AutoTextEntries
.CBOAddress.AddItem oAutotext.Name
I've tried changing:-
strAddress = .CBOAddress.Text
to
strAddress = .CBOAddress.Value
but it still doesn't put the whole address in.
So, if I get this right,
In the userform, the user selects a company.
In the template you have stored each company address as an autotext
So, when the user is done with the userform, you need to correlate the
company name that was selected on the userform with the appropriate address
and enter it in the document at a bookmark.
Is that right?
--
Salut!
_______________________________________
Jean-Guy Marcil - Word MVP
(e-mail address removed)
Word MVP site:
http://www.word.mvps.org