Export table to Word merge doc

C

Cindy

I am not sure if this is a MS issue or a security issue
within my office. I am trying to automate the merge of
an access table to an existing word merge doc. I have

docmd.transfertext
acExportMerge, , "tempMerge", "c:\data\merge.doc"

I am getting an error "Cannot Update. Database or Object
is read only"

Our security will not give me administrative rights on my
pc. Could that be causing the error, or is my code wrong?
 
C

Cindy

When I renamed it .txt it the merge just deleted the word
form and replaced it with the data from the table I am
exporting in a delimited format.
I have done searchs in the Knowledge base and I have
found the articles on the error but they don't apply in
this case. What this code does in 97 - opens the word
doc and performs the merge and ends with the completed
document open in word ready to be printed or saved.
I have tried making the word form in a .rtf format and it
gives the same error when trying to merge.
Thanks for the ideas though. Finding the chart of
allowed file extensions will be helpful in the future.
-----Original Message-----
Hi Cindy,

This one is almost certainly caused by your filename. Recent versions of
Access require text files to use standard extensions such as .txt and
..csv. The simplest thing is just to call it merge.txt rather than
merge.doc; otherwise this article
http://support.microsoft.com/default.aspx?scid=kb;en- us;304206 shows how
to change the extensions that Access will accept.

I am not sure if this is a MS issue or a security issue
within my office. I am trying to automate the merge of
an access table to an existing word merge doc. I have

docmd.transfertext
acExportMerge, , "tempMerge", "c:\data\merge.doc"

I am getting an error "Cannot Update. Database or Object
is read only"

Our security will not give me administrative rights on my
pc. Could that be causing the error, or is my code
wrong?

--
John Nurick [Microsoft Access MVP]

Please respond in the newgroup and not by email.
.
 
J

John Nurick

Comments inline.

When I renamed it .txt it the merge just deleted the word
form and replaced it with the data from the table I am
exporting in a delimited format.

As far as I know this is what's meant to happen:
DoCmd.TransferText acExportMerge
just creates a textfile containing the data with a layout that Word will
be able to import.

Take a look at Albert Kallal's sample mailmerge application at
http://www.attcanada.net/~kallal.msn/wordmerge/index.html. This lets
you set up a one-button merge.

I have done searchs in the Knowledge base and I have
found the articles on the error but they don't apply in
this case. What this code does in 97 - opens the word
doc and performs the merge and ends with the completed
document open in word ready to be printed or saved.
I have tried making the word form in a .rtf format and it
gives the same error when trying to merge.
Thanks for the ideas though. Finding the chart of
allowed file extensions will be helpful in the future.
-----Original Message-----
Hi Cindy,

This one is almost certainly caused by your filename. Recent versions of
Access require text files to use standard extensions such as .txt and
..csv. The simplest thing is just to call it merge.txt rather than
merge.doc; otherwise this article
http://support.microsoft.com/default.aspx?scid=kb;en- us;304206 shows how
to change the extensions that Access will accept.

I am not sure if this is a MS issue or a security issue
within my office. I am trying to automate the merge of
an access table to an existing word merge doc. I have

docmd.transfertext
acExportMerge, , "tempMerge", "c:\data\merge.doc"

I am getting an error "Cannot Update. Database or Object
is read only"

Our security will not give me administrative rights on my
pc. Could that be causing the error, or is my code
wrong?

--
John Nurick [Microsoft Access MVP]

Please respond in the newgroup and not by email.
.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top