Solved

Acccess 2003: Automating Mail merge (question 2)

Posted on 2012-04-09
8
378 Views
Last Modified: 2012-04-09
Hi EE,

My colleague gave me a word doc that he used in his mail merge.

However, i needed to change the field names in his doc, to reflect the field names
of my excel data source.

When my vba runs the merge, the word doc STILL is looking for the old fields in the template.

i checked the template, and i do not see them there, however word is looking for them
as in the screen shot below.

do you have any ideas, how to find these fields?

tx, sandra

scrn
0
Comment
Question by:mytfein
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 2
  • 2
8 Comments
 
LVL 10

Expert Comment

by:plummet
ID: 37824804
Hi Sandra

What happens if you select a field from the list that's shown ("...valid merge field from the data source...")? That list should be based on your excel source, or is it showing the old fields from your colleague?

Regards
John
0
 

Author Comment

by:mytfein
ID: 37824817
Hi John,

tx for writing....

the tool bar buttons are mostly greyed out, so cannot attempt your idea

any way to use the tool bar?

tx, s
0
 
LVL 76

Expert Comment

by:GrahamSkan
ID: 37824861
It may be that the MergeField is nested in another field, such an IF field, so won't be visible.

Try using the Alt+F9 toggle to show the field codes instead of the field results.


Remember that the correct use of a Template (after it has been designed) should not involve changing it.  It is used used to create (e.g. by File/New) a Document that is based on it and which has access to that Template's facilities such as the macro code and styles.

Incidentally, although not formally a Template in the Word sense, a mail merge main Document is also not changed during the execution of a mail merge, so is a template (with a small 't') in effect.
0
Comprehensive Backup Solutions for Microsoft

Acronis protects the complete Microsoft technology stack: Windows Server, Windows PC, laptop and Surface data; Microsoft business applications; Microsoft Hyper-V; Azure VMs; Microsoft Windows Server 2016; Microsoft Exchange 2016 and SQL Server 2016.

 

Author Comment

by:mytfein
ID: 37824901
Hi John,

so i went to template and manually set the data source

my header in excel do not have hyphens, but when i insert the field into document

it comes along with hyphens for the spaces.... is that valid to happen?

Also, now i can view the toolbar, and if i click on field list, the fields are what i want with

embedded spaces as in the excel spreadsheet....

so i do not understand why when i import the spreadsheet, the spaces are being replaced with hyphens

and the field list does not show the fields that word says are in the document....

sigh....tx...s
0
 
LVL 10

Expert Comment

by:plummet
ID: 37824929
I wonder if you're now seeing 'codes' where the spaces are, that's possible if you have toggled field codes on. How about trying to print a page to see if it looks OK? Also, is the merged data what you actually want, in the right place?

You''ll get there!

John
0
 
LVL 76

Accepted Solution

by:
GrahamSkan earned 500 total points
ID: 37824989
If your datasource field names contain spaces (legal), they will be replaces by underscores because a merge field name cannot contain spaces.
0
 

Author Comment

by:mytfein
ID: 37825001
hi John,

u know what's weird:

if i copy <<clerkship title 1>> to another place and modify the 1 to a 2,

it does not bring in <<clerkship title 2>>, but clerkship title 1 again,

so i create a brand new doc, and am using the field list to insert

ist that the way it works, that i cannot copy and past and modify the pasted fields

name?
0
 

Author Comment

by:mytfein
ID: 37825098
Hi Graham,

do u have any thoughts on copy/pasting a merge field and then modifying the name of the copied field.... it seems that it did "no take" and i hot to copy it from the clicking the field
list icon

also can u pls check out another new merge question that i posted.... tx, s
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

It’s been over a month into 2017, and there is already a sophisticated Gmail phishing email making it rounds. New techniques and tactics, have given hackers a way to authentically impersonate your contacts.How it Works The attack works by targeti…
Did you know that more than 4 billion data records have been recorded as lost or stolen since 2013? It was a staggering number brought to our attention during last week’s ManageEngine webinar, where attendees received a comprehensive look at the ma…
This Micro Tutorial will demonstrate the scrolling table in Microsoft Excel using the INDEX function.
In a previous video Micro Tutorial here at Experts Exchange (http://www.experts-exchange.com/videos/1358/How-to-get-a-free-trial-of-Office-365-with-the-Office-2016-desktop-applications.html), I explained how to get a free, one-month trial of Office …

734 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question