Question

Locked

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

By amie.dellinger ·
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.

This conversation is currently closed to new comments.

6 total posts (Page 1 of 1)  
| Thread display: Collapse - | Expand +

All Answers

Collapse -

Post your macro

by Maevinn In reply to Access 2003 Transfer Text ...

Can you C&P the macro you've written?

Collapse -

Macro I wrote

by amie.dellinger In reply to Post your macro

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

Collapse -

Try stepping through it

by Maevinn In reply to Macro I wrote

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

Collapse -

I think this is where the error is...

by amie.dellinger In reply to Try stepping through it

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

Collapse -

Sounds like

by Maevinn In reply to I think this is where the ...

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.

Back to Hardware Forum
6 total posts (Page 1 of 1)  

Related Discussions

Related Forums