Reply
 
Thread Tools Display Modes
  #1   Report Post  
Posted to microsoft.public.word.mailmerge.fields
George George is offline
external usenet poster
 
Posts: 77
Default Link addresses from Outlook 2003

Dear friends,
I need to have a dropdown menu in a template in order to select the coutry.
In my outllook 2003 I have my country contacts in separate folders, e.g.
contact1 appears in a folder named UK.
By selecting the country (UK) from the dropdown menu I would like to insert
his contact details in a new document (perhaps using mail merge). I need
this to be done automatically.

Please advice me.

Thanking you in advance.

George
  #2   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Peter Jamieson Peter Jamieson is offline
external usenet poster
 
Posts: 4,582
Default Link addresses from Outlook 2003

This is tricky because you would need to connect to the contacts folder
programmatically, e.g. using VBA, and as far as I know there is no reliable
way to do it. It is perhaps relevant that if you macro record the action of
selecting an Outlook contacts folder, the resulting macro is empty (Word
2003) and even in Word 2007 it contains a call to the old Wordbasic object.

You /can/ get Word to pop up the connection dialog and allow the user to
select a folder using the following VBA, but the selection dialog pops up
twice and I have not found a way to prevent that.

ActiveDocument.MailMerge.OpenDataSource _
Name:="", _
Subtype:=wdMergeSubTypeOutlook

As long as there is an active connection to /an/ Outlook contacts folder,
and as long as all the folders you want to use are subfolders of the same
main folder as that folder and they are all folders in the Outlook Address
Book, then you should be able to change the folder programmatically using
VBA. For example, to change to the "UK" folder, use:

ActiveDocument.MailMerge.DataSource.QueryString="S ELECT * FROM [UK]"

NB, the name UK needs to be the name of the Outlook folder, not the name of
the Address Book in the Outlook Address Book, which can in theory be
different.

if you tend to view your Contact folders using the Contacts button in the
navigation pane in Outlook 2003, you won't see the folder hierarchy - you
need to switch to the folder view to see it. But again, as far as I know
there is no way to use a SELECT to select a folder in a different subfolder
than the one that has already been selected. I'd rather not go into the gory
details of why I think that is so.

Peter Jamieson
"George" wrote in message
...
Dear friends,
I need to have a dropdown menu in a template in order to select the
coutry.
In my outllook 2003 I have my country contacts in separate folders, e.g.
contact1 appears in a folder named UK.
By selecting the country (UK) from the dropdown menu I would like to
insert
his contact details in a new document (perhaps using mail merge). I need
this to be done automatically.

Please advice me.

Thanking you in advance.

George



  #3   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Graham Mayor Graham Mayor is offline
external usenet poster
 
Posts: 19,312
Default Link addresses from Outlook 2003

To add to what Peter has said, if your various Outlook contacts lists have
their properties set to be used as e-mail address books, they will all be
available from the insert address tool. You can enhance that function with
vba in Word to make sure it types the information where you want it and
there are several examples of this use at
http://www.gmayor.com/Macrobutton.htm . When the address dialog pops up you
select the contacts list you want to use and pick the name from that list
and the macro does the rest.

An alternative, using mail merge would be to create a merge document with
the fields already placed then pick the contact in Outlook and merge that
one record with the document.
http://www.gmayor.com/mailmerge_from_outlook.htm For single letters, the
first method is a bit more complex to set up, but once configured is quicker
and easier to use.

--

Graham Mayor - Word MVP

My web site www.gmayor.com
Word MVP web site http://word.mvps.org


George wrote:
Dear friends,
I need to have a dropdown menu in a template in order to select the
country. In my outlook 2003 I have my country contacts in separate
folders, e.g. contact1 appears in a folder named UK.
By selecting the country (UK) from the dropdown menu I would like to
insert his contact details in a new document (perhaps using mail
merge). I need this to be done automatically.

Please advice me.

Thanking you in advance.

George



  #4   Report Post  
Posted to microsoft.public.word.mailmerge.fields
George George is offline
external usenet poster
 
Posts: 77
Default Link addresses from Outlook 2003

Thanks a lot for your help.

Let me re-phrase the question (a simpier one). I want to create a Word
template (perhaps using the mail merge), so I can have the mailing address of
a single contact (from Outlook). It happens sometimes to change the mailing
address of the contact in Outlook. The next time I open my Word template I
want to see the new address (derived from Outlook) - Update fields? How can
I do that?

Thanks a lot again.

George

Ο χρήστης "Graham Mayor" *γγραψε:

To add to what Peter has said, if your various Outlook contacts lists have
their properties set to be used as e-mail address books, they will all be
available from the insert address tool. You can enhance that function with
vba in Word to make sure it types the information where you want it and
there are several examples of this use at
http://www.gmayor.com/Macrobutton.htm . When the address dialog pops up you
select the contacts list you want to use and pick the name from that list
and the macro does the rest.

An alternative, using mail merge would be to create a merge document with
the fields already placed then pick the contact in Outlook and merge that
one record with the document.
http://www.gmayor.com/mailmerge_from_outlook.htm For single letters, the
first method is a bit more complex to set up, but once configured is quicker
and easier to use.

--

Graham Mayor - Word MVP

My web site www.gmayor.com
Word MVP web site http://word.mvps.org


George wrote:
Dear friends,
I need to have a dropdown menu in a template in order to select the
country. In my outlook 2003 I have my country contacts in separate
folders, e.g. contact1 appears in a folder named UK.
By selecting the country (UK) from the dropdown menu I would like to
insert his contact details in a new document (perhaps using mail
merge). I need this to be done automatically.

Please advice me.

Thanking you in advance.

George




  #5   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Graham Mayor Graham Mayor is offline
external usenet poster
 
Posts: 19,312
Default Link addresses from Outlook 2003

I don't know a way to do this with mail merge from Outlook. Merges from
Outlook create transient temporary files for the duration. They are not
available for re-use, unless you create a permanent data file which would
not be updated by any changes to the Outlook contact. If youhave to create a
permanent data source then you might as well create an autotext entry in
Word. I have already suggested my take on the best way of doing this. It
merely requires a couple of extra steps from 'automatic'.

You might ask in the vba forum to see if anyone can come up with anything
better.

--

Graham Mayor - Word MVP

My web site www.gmayor.com
Word MVP web site http://word.mvps.org




George wrote:
Thanks a lot for your help.

Let me re-phrase the question (a simpier one). I want to create a
Word template (perhaps using the mail merge), so I can have the
mailing address of a single contact (from Outlook). It happens
sometimes to change the mailing address of the contact in Outlook.
The next time I open my Word template I want to see the new address
(derived from Outlook) - Update fields? How can I do that?

Thanks a lot again.

George

? ??????? "Graham Mayor" ???????:

To add to what Peter has said, if your various Outlook contacts
lists have their properties set to be used as e-mail address books,
they will all be available from the insert address tool. You can
enhance that function with vba in Word to make sure it types the
information where you want it and there are several examples of this
use at http://www.gmayor.com/Macrobutton.htm . When the address
dialog pops up you select the contacts list you want to use and pick
the name from that list and the macro does the rest.

An alternative, using mail merge would be to create a merge document
with the fields already placed then pick the contact in Outlook and
merge that one record with the document.
http://www.gmayor.com/mailmerge_from_outlook.htm For single
letters, the first method is a bit more complex to set up, but once
configured is quicker and easier to use.

--

Graham Mayor - Word MVP

My web site www.gmayor.com
Word MVP web site http://word.mvps.org


George wrote:
Dear friends,
I need to have a dropdown menu in a template in order to select the
country. In my outlook 2003 I have my country contacts in separate
folders, e.g. contact1 appears in a folder named UK.
By selecting the country (UK) from the dropdown menu I would like to
insert his contact details in a new document (perhaps using mail
merge). I need this to be done automatically.

Please advice me.

Thanking you in advance.

George





  #6   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Peter Jamieson Peter Jamieson is offline
external usenet poster
 
Posts: 4,582
Default Link addresses from Outlook 2003

Your question may be simpler but an answer probably is not (as usual!)

To do this using a MailMerge approach, you could start as follows.

Suppose you make a Word tempalte (or document - I do not think it makes much
difference in this case) that uses your Contact's folder as its Mail Merge
Data Source. Save the template/document, and re-open it, or create a new
document based on the template. At that point you will I think be asked
(twice) to select your contacts folder. That's the real problem here, as we
shall see

Let's suppose you now try to restrict your data source to the one contact
you want to use. You will need to have criteria that uniquely identify the
contact - e.g. Firstname, lastname may or may not be enough.

Open the Mail Merge Recipients dialog box, clcik the drop-down at the top of
one of the columns, and seelct Advanced to view the Query Options dialog.
You can then specify the conditions needed to select that one record. When
you get back into the Mail merge Recipients Dialog box, only one row should
be displayed. Incidentally, you could just "clear" all the entries, and
select the one you want, but then you would be relying on Word's internal,
undocumented mechanism for identifying which records you have selected and I
suspect that is best avoided.

Now close the recipients dialog box. Show the preview data including the
address that you want to see updated. Save the template. Experimentally
change the address data for the contact. When you re-open the Word template,
and select the correct contacts folder, the new data from the contact should
be displayed. However, you have to know which contacts folder to open. If
you get the wrong one, Word won't find the record you wanted.

There is another way you can go about doing this, which is to use Access to
link to a Contacts folder, then use that linked Access table as your data
source. It seems to work quite well to me and avoids some of the problems
mentioned above. At the moment I can only tell you how it works if you have
Access, but a programmatic solution may also be feasible.

Peter Jamieson

"George" wrote in message
...
Thanks a lot for your help.

Let me re-phrase the question (a simpier one). I want to create a Word
template (perhaps using the mail merge), so I can have the mailing address
of
a single contact (from Outlook). It happens sometimes to change the
mailing
address of the contact in Outlook. The next time I open my Word template
I
want to see the new address (derived from Outlook) - Update fields? How
can
I do that?

Thanks a lot again.

George

? ??????? "Graham Mayor" ???????:

To add to what Peter has said, if your various Outlook contacts lists
have
their properties set to be used as e-mail address books, they will all be
available from the insert address tool. You can enhance that function
with
vba in Word to make sure it types the information where you want it and
there are several examples of this use at
http://www.gmayor.com/Macrobutton.htm . When the address dialog pops up
you
select the contacts list you want to use and pick the name from that list
and the macro does the rest.

An alternative, using mail merge would be to create a merge document with
the fields already placed then pick the contact in Outlook and merge that
one record with the document.
http://www.gmayor.com/mailmerge_from_outlook.htm For single letters, the
first method is a bit more complex to set up, but once configured is
quicker
and easier to use.

--

Graham Mayor - Word MVP

My web site www.gmayor.com
Word MVP web site http://word.mvps.org


George wrote:
Dear friends,
I need to have a dropdown menu in a template in order to select the
country. In my outlook 2003 I have my country contacts in separate
folders, e.g. contact1 appears in a folder named UK.
By selecting the country (UK) from the dropdown menu I would like to
insert his contact details in a new document (perhaps using mail
merge). I need this to be done automatically.

Please advice me.

Thanking you in advance.

George






  #7   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Peter Jamieson Peter Jamieson is offline
external usenet poster
 
Posts: 4,582
Default Link addresses from Outlook 2003

then use that linked Access table as your data source. It seems to work
quite well to me


Except you also have to create an Access query that gets all the data from
the Access table then use /that/ as the data source.

Peter Jamieson
"Peter Jamieson" wrote in message
...
Your question may be simpler but an answer probably is not (as usual!)

To do this using a MailMerge approach, you could start as follows.

Suppose you make a Word tempalte (or document - I do not think it makes
much difference in this case) that uses your Contact's folder as its Mail
Merge Data Source. Save the template/document, and re-open it, or create a
new document based on the template. At that point you will I think be
asked (twice) to select your contacts folder. That's the real problem
here, as we shall see

Let's suppose you now try to restrict your data source to the one contact
you want to use. You will need to have criteria that uniquely identify the
contact - e.g. Firstname, lastname may or may not be enough.

Open the Mail Merge Recipients dialog box, clcik the drop-down at the top
of one of the columns, and seelct Advanced to view the Query Options
dialog. You can then specify the conditions needed to select that one
record. When you get back into the Mail merge Recipients Dialog box, only
one row should be displayed. Incidentally, you could just "clear" all the
entries, and select the one you want, but then you would be relying on
Word's internal, undocumented mechanism for identifying which records you
have selected and I suspect that is best avoided.

Now close the recipients dialog box. Show the preview data including the
address that you want to see updated. Save the template. Experimentally
change the address data for the contact. When you re-open the Word
template, and select the correct contacts folder, the new data from the
contact should be displayed. However, you have to know which contacts
folder to open. If you get the wrong one, Word won't find the record you
wanted.

There is another way you can go about doing this, which is to use Access
to link to a Contacts folder, then use that linked Access table as your
data source. It seems to work quite well to me and avoids some of the
problems mentioned above. At the moment I can only tell you how it works
if you have Access, but a programmatic solution may also be feasible.

Peter Jamieson

"George" wrote in message
...
Thanks a lot for your help.

Let me re-phrase the question (a simpier one). I want to create a Word
template (perhaps using the mail merge), so I can have the mailing
address of
a single contact (from Outlook). It happens sometimes to change the
mailing
address of the contact in Outlook. The next time I open my Word template
I
want to see the new address (derived from Outlook) - Update fields? How
can
I do that?

Thanks a lot again.

George

? ??????? "Graham Mayor" ???????:

To add to what Peter has said, if your various Outlook contacts lists
have
their properties set to be used as e-mail address books, they will all
be
available from the insert address tool. You can enhance that function
with
vba in Word to make sure it types the information where you want it and
there are several examples of this use at
http://www.gmayor.com/Macrobutton.htm . When the address dialog pops up
you
select the contacts list you want to use and pick the name from that
list
and the macro does the rest.

An alternative, using mail merge would be to create a merge document
with
the fields already placed then pick the contact in Outlook and merge
that
one record with the document.
http://www.gmayor.com/mailmerge_from_outlook.htm For single letters,
the
first method is a bit more complex to set up, but once configured is
quicker
and easier to use.

--

Graham Mayor - Word MVP

My web site www.gmayor.com
Word MVP web site http://word.mvps.org


George wrote:
Dear friends,
I need to have a dropdown menu in a template in order to select the
country. In my outlook 2003 I have my country contacts in separate
folders, e.g. contact1 appears in a folder named UK.
By selecting the country (UK) from the dropdown menu I would like to
insert his contact details in a new document (perhaps using mail
merge). I need this to be done automatically.

Please advice me.

Thanking you in advance.

George







  #8   Report Post  
Posted to microsoft.public.word.mailmerge.fields
George George is offline
external usenet poster
 
Posts: 77
Default Link addresses from Outlook 2003

Thanks a lot my friend,

I think I will do it in Access.

Ο χρήστης "Peter Jamieson" *γγραψε:

then use that linked Access table as your data source. It seems to work
quite well to me


Except you also have to create an Access query that gets all the data from
the Access table then use /that/ as the data source.

Peter Jamieson
"Peter Jamieson" wrote in message
...
Your question may be simpler but an answer probably is not (as usual!)

To do this using a MailMerge approach, you could start as follows.

Suppose you make a Word tempalte (or document - I do not think it makes
much difference in this case) that uses your Contact's folder as its Mail
Merge Data Source. Save the template/document, and re-open it, or create a
new document based on the template. At that point you will I think be
asked (twice) to select your contacts folder. That's the real problem
here, as we shall see

Let's suppose you now try to restrict your data source to the one contact
you want to use. You will need to have criteria that uniquely identify the
contact - e.g. Firstname, lastname may or may not be enough.

Open the Mail Merge Recipients dialog box, clcik the drop-down at the top
of one of the columns, and seelct Advanced to view the Query Options
dialog. You can then specify the conditions needed to select that one
record. When you get back into the Mail merge Recipients Dialog box, only
one row should be displayed. Incidentally, you could just "clear" all the
entries, and select the one you want, but then you would be relying on
Word's internal, undocumented mechanism for identifying which records you
have selected and I suspect that is best avoided.

Now close the recipients dialog box. Show the preview data including the
address that you want to see updated. Save the template. Experimentally
change the address data for the contact. When you re-open the Word
template, and select the correct contacts folder, the new data from the
contact should be displayed. However, you have to know which contacts
folder to open. If you get the wrong one, Word won't find the record you
wanted.

There is another way you can go about doing this, which is to use Access
to link to a Contacts folder, then use that linked Access table as your
data source. It seems to work quite well to me and avoids some of the
problems mentioned above. At the moment I can only tell you how it works
if you have Access, but a programmatic solution may also be feasible.

Peter Jamieson

"George" wrote in message
...
Thanks a lot for your help.

Let me re-phrase the question (a simpier one). I want to create a Word
template (perhaps using the mail merge), so I can have the mailing
address of
a single contact (from Outlook). It happens sometimes to change the
mailing
address of the contact in Outlook. The next time I open my Word template
I
want to see the new address (derived from Outlook) - Update fields? How
can
I do that?

Thanks a lot again.

George

? ??????? "Graham Mayor" ???????:

To add to what Peter has said, if your various Outlook contacts lists
have
their properties set to be used as e-mail address books, they will all
be
available from the insert address tool. You can enhance that function
with
vba in Word to make sure it types the information where you want it and
there are several examples of this use at
http://www.gmayor.com/Macrobutton.htm . When the address dialog pops up
you
select the contacts list you want to use and pick the name from that
list
and the macro does the rest.

An alternative, using mail merge would be to create a merge document
with
the fields already placed then pick the contact in Outlook and merge
that
one record with the document.
http://www.gmayor.com/mailmerge_from_outlook.htm For single letters,
the
first method is a bit more complex to set up, but once configured is
quicker
and easier to use.

--

Graham Mayor - Word MVP

My web site www.gmayor.com
Word MVP web site http://word.mvps.org


George wrote:
Dear friends,
I need to have a dropdown menu in a template in order to select the
country. In my outlook 2003 I have my country contacts in separate
folders, e.g. contact1 appears in a folder named UK.
By selecting the country (UK) from the dropdown menu I would like to
insert his contact details in a new document (perhaps using mail
merge). I need this to be done automatically.

Please advice me.

Thanking you in advance.

George








Reply
Thread Tools
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Word 2000 link to Outlook 2003 doesn't work John Simons Microsoft Word Help 1 September 12th 06 06:38 AM
Addresses in Word 2003 from Outlook 2003 klm New Users 1 August 25th 06 06:44 AM
word to link to contacts in outlook 2003 Mark Mailmerge 4 July 31st 06 04:25 AM
Mail merge with addresses from Outlook 2003 Philippe Mailmerge 7 December 30th 05 09:35 AM
How do I link Outlook 2003 as my email address book in Word Golfcrazy Microsoft Word Help 2 June 7th 05 09:02 PM


All times are GMT +1. The time now is 10:40 AM.

Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright 2004-2024 Microsoft Office Word Forum - WordBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Word"