Question Locked

Access 2003 Transfer Text/Word Mail Merge HELP!!!

0 helpful
6 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.

Good afternoon all,

I am trying to create a macro that will basically do the same thing as "Tools, Office Links, Merge with Microsoft Word".

My plan is to set up different macros to filter by assignment, so that users can click on a button in the switchboard, and print out merge letters for their assigned counselors.

I keep having problems with trying to run the macro, - I don't know VBA language, and am in the dark with most of this stuff.

I tried to create a macro, using the transfer text "Export Word for Windows Merge" - into my merge.doc, but I get an error that says "Cannot update. Database or object is read-only."

I thought it may be a permission problem, so I moved everything onto my own local hard drive, checked all of the file properties and permissions of the database, the word document, and all of the database objects.

I am lost!

If anyone could offer any help of any kind, I would greatly appreciate it.

Thank you so much,

- Amie.

6 replies

by amie.dellinger

Action: Transfer Text
Transfer Type: Export Word for Windows Merge
Table Name: Amie - HSV Merge Letters
File Name: N\Admissions\High School Visits\HSV Letter Materials\HSV Confirmation Letter.doc
Has Field Names: Yes

Here is the VBA Code:

'------------------------------------------------------------
' Macro1
'
'------------------------------------------------------------
Function Macro1()
On Error GoTo Macro1_Err

DoCmd.OpenQuery "Amie - HSV Merge Letters", acViewNormal, acEdit
DoCmd.TransferText acExportMerge, "", "Amie - HSV Merge Letters", "N:\Admissions\High School Visits\HSV Letter Materials\HSV Confirmation Letter.doc", True, ""

Macro1_Exit:
Exit Function

Macro1_Err:
MsgBox Error$
Resume Macro1_Exit

End Function

by maevinn

Test each line and determine which one is generating the error.

by amie.dellinger

DoCmd.TransferText acExportMerge, "", "Amie - HSV Merge Letters", "N:\Admissions\High School Visits\HSV Letter Materials\HSV Confirmation Letter.doc", True, ""

by maevinn

Maybe it's not in the query, but rather something in the end file. Apparently that's a common error (no permissions) when the field names don't match up with precisely with the column names in the table.

Given the files names here, I'll guess the field names might include a lot of spaces and symbols, which may complicate tracking it down. If you can't locate the errant field/column, create a new merge document and add the fields one at a time, testing in between additions.

This discussion is closed to new replies.