Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Word / Programming / February 2006

Tip: Looking for answers? Try searching our database.

Getting data from file into comboboxes and listboxes

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Jim - 10 Feb 2006 04:44 GMT
Hello,

My question comes in 3 parts really.  I scanned the newsgroup and found
some help, but the tips I tried seemed to take a long time.

Here goes...

I have a template that will be used to generate a letter.  Each letter will
be addressed to one person, and then have copies to go to others, from none
to likely up to 5.  

I have a userform that opens to ask some other information that is needed
in the letter as well.  

The names and addresses of the people are in a word merge data file which I
have also replicated into an access table.

How can I:
1. load a combobox with the names, then when this is selected add the
name/address to the letter (like a mail merge).

2.then select 0 to multiple names from the listbox for the copy list.  If
possible, can some other information about each address (fax number, email
address etc) be selected as well but not show up in the text, (? save as
document variable), as some of the people will want a fax/email but not a
letter.

3.I would then print, fax or email copies depending on the preferences
listged in the table.

I know some about VBA but get sweaty when I think of using an API call.  I
can work thru most of the code that I see here, but am not familiar with a
lot of the specialized methods/calls that you guys use so well.

My thanks and admiration for all the help you all give out.

Jim   (remove the nospam to email)
Jean-Guy Marcil - 10 Feb 2006 16:26 GMT
Jim was telling us:
Jim nous racontait que :

> Hello,
>
[quoted text clipped - 16 lines]
> 1. load a combobox with the names, then when this is selected add the
> name/address to the letter (like a mail merge).

See
   http://word.mvps.org/faqs/interdev/FillListBoxFromXLDAO.htm
for an example involving Excel.

Or, see this thread for the same type of questioning:
   http://tinyurl.com/csoz5

> 2.then select 0 to multiple names from the listbox for the copy list.
> If possible, can some other information about each address (fax
> number, email address etc) be selected as well but not show up in the
> text, (? save as document variable), as some of the people will want
> a fax/email but not a letter.

Same list box?
How will you know how each contacts prefers to be contacted?

You could create 5 custom document properties called Contact1 to Contact5
and store info in those.

> 3.I would then print, fax or email copies depending on the preferences
> listged in the table.

All of this automatically?

Signature

Salut!
_______________________________________
Jean-Guy Marcil - Word MVP
jmarcilREMOVE@CAPSsympatico.caTHISTOO
Word MVP site: http://www.word.mvps.org 

Jim - 11 Feb 2006 02:40 GMT
Thanks for answering Jean-Guy Marcil, I'll check out the link.

Each record in the data file has as one of the fields as a contacttype -
this has 1 (mail), 2 (fax) and 3 (email).  When it comes time to  
print/send, each contact is "sent" the mail as per their preference.

Thanks again, jim

> Jim was telling us:
> Jim nous racontait que :
[quoted text clipped - 43 lines]
>
> All of this automatically?
Jean-Guy Marcil - 11 Feb 2006 05:37 GMT
Jim was telling us:
Jim nous racontait que :

> Thanks for answering Jean-Guy Marcil, I'll check out the link.
>
> Each record in the data file has as one of the fields as a
> contacttype - this has 1 (mail), 2 (fax) and 3 (email).  When it
> comes time to print/send, each contact is "sent" the mail as per
> their preference.

1. Use the .PrintOut method (See the online help)
2. See http://word.mvps.org/faqs/interdev/SendMail.htm
3. Use the .SendFax method (See the online help) if you have Microsoft Fax
installed, or see http://tinyurl.com/734mj for some other ideas.

Signature

Salut!
_______________________________________
Jean-Guy Marcil - Word MVP
jmarcilREMOVE@CAPSsympatico.caTHISTOO
Word MVP site: http://www.word.mvps.org 

Zoltar54 - 14 Feb 2006 20:02 GMT
I have a similiar question.  I currently have a combobox that pulls out a
recordset from Excel.  However I would like to have this recordset
automatically updated when a "new" entry is tryped into the combobox. Is this
possible?

Any help you can provide would be greatly appreciated.

Z

> Jim was telling us:
> Jim nous racontait que :
[quoted text clipped - 10 lines]
> 3. Use the .SendFax method (See the online help) if you have Microsoft Fax
> installed, or see http://tinyurl.com/734mj for some other ideas.
Jean-Guy Marcil - 15 Feb 2006 00:54 GMT
Zoltar54 was telling us:
Zoltar54 nous racontait que :

> I have a similiar question.  I currently have a combobox that pulls
> out a recordset from Excel.  However I would like to have this
> recordset automatically updated when a "new" entry is tryped into the
> combobox. Is this possible?
>
> Any help you can provide would be greatly appreciated.

Yes, this means controlling Excel from Word... So you would be better served
by asking in an Excel NG...

Signature

Salut!
_______________________________________
Jean-Guy Marcil - Word MVP
jmarcilREMOVE@CAPSsympatico.caTHISTOO
Word MVP site: http://www.word.mvps.org 

Zoltar54 - 15 Feb 2006 14:55 GMT
Merci beaucoup Monsieur, ça c`est sage conseil.

Bon Journeé

> Zoltar54 was telling us:
> Zoltar54 nous racontait que :
[quoted text clipped - 8 lines]
> Yes, this means controlling Excel from Word... So you would be better served
> by asking in an Excel NG...
Jean-Guy Marcil - 15 Feb 2006 15:05 GMT
Zoltar54 was telling us:
Zoltar54 nous racontait que :

> Merci beaucoup Monsieur, ça c`est sage conseil.
>
> Bon Journeé

lol
Nice try

Good luck!

Signature

Salut!
_______________________________________
Jean-Guy Marcil - Word MVP
jmarcilREMOVE@CAPSsympatico.caTHISTOO
Word MVP site: http://www.word.mvps.org 

 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.