473,659 Members | 2,667 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

TransferSpreads heet, word automation; 'Error 0'

Hello,

When executing DoCmd.TransferS preadsheet to an .xls file that's being
used as a datasource for a Word mail merge document, if that Word
document is currently open, the TransferSpreads heet action fails with
an 'Error 0'. I have tried different methods of trapping that error,
and I still cannot get my app to indicate that the user should exit
Word: I have tried disabling the error handler before DoCmd is called,
looking for an Err object after the call, and then using Err.Raise to
generate a custom error:

On Error Resume Next
DoCmd.TransferS preadsheet acExport, acSpreadsheetTy peExcel9,
tblName, xlsPath, , "DP_table"
If Err Then
Err.Raise 811, "Document pump", Err.description & vbCrLf &
"(note: Word may have crashed, leaving the file locked; killing the
WINWORD.EXE task may solve this)."
End If
On Error GoTo error_exit

.... but this does not work: still Error 0. If I do not disable the
error handler, DoCmd never reaches the Err.Raise statement, leaving me
with Error 0 again.

I have tried determining whether or not the Word document is open
(using methods of the Word automation objects) but it didn't work for a
non-admin user (which is a problem).

Please note that I am properly exiting my function before the error
handler (most posts on this board regarding Error 0 were due to this).

Does anyone have any suggestions?

Thanking you kindly in advance,
Robert Waters

Sep 27 '06 #1
0 1829

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
12075
by: mickeydisn | last post by:
Sub: C++ Word automation Extract text hello. I want extact text form a word document using a visual c++ programme. I have see a lot of documentation. and my analysis is that I must use a "word automation". I have foud a lot of exemple to use it but I need your precious help to
1
2800
by: Kent Eilers | last post by:
I'm learning automation basics here with a Access-Word mail merge. Specifically I want to obtain a reference to the Word error object....using Access as an automation client. Is this possible? I've looked over the Word object model provided in the excellent "access 97 developer's handbook" and did not find any treatment of this. I have used Access as a front end to an Oracle database and have been able to write code to handle ODBC...
3
615
by: Mike MacSween | last post by:
Office 2000 From Access I've been starting an instance of word and doing a mail merge. Everything hunky-dory until I applied SP1 yesterday. Now this: dim wrd as Object set wrd = CreateObject("Word.Application")
12
5516
by: Cheval | last post by:
Has anyone had any problems with inter-office automation between MS Word and MS Access in Office 2003? I have recently installed office 2003 in a new folder and have left the older office 2000 and office XP components installed. ie I have word/access/excel 2k/xp/2003 installed. I tried to do a usual access 2k to word 2k automation yet I get the error "Automation Error" "ClassFactory cannot supply requested class" when on late binding try...
0
2180
by: Mick Hardy | last post by:
Hi, Has anyone seen this weird behaviour or have any suggestions or can anyone reproduce it? The history: I converted a large third party DB from 97 to XP and it uses the TransferSpreadsheet method. This method requires a somewhat complicated spreadsheet to be open in order to work. A simple
1
6184
by: barma16 | last post by:
I've hit a bit of a brick wall here, and could use some advice. I have an Access application whose output is a four-tab Excel spreadsheet where three of the four tabs are the result of database queries. A number of fields in the queries are designed to become formulae in Excel after the export has taken place (and they need to be in Excel rather than Access). I need to use the TransferSpreadsheet Method rather than the OutputTo to enable...
4
11127
by: Yohancef Chin | last post by:
Hi, Being fairly new to .NET I am looking for a way to call MS Word from an event on a webform, and after the user is finished save that created document to an SQL Server database. Has anyone done this? Does it seem possible? I followed the instructions from a sample on the Microsoft knowledge base but it only seems to work when creating a VB.NET Windows .EXE, not an VB.NET ASP app.
2
2503
by: AlenaMezh | last post by:
Hello! My Code destroys Excel's normal work.After running this code I acan' open excel file as normal. Do you know why? Please, answer. Public Function import_test_1() Dim objXL As Object Dim objWB As Object 'Dim objXL As Excel.Application 'Dim objWB As Excel.Workbook
3
3236
by: Greg (codepug | last post by:
For the purpose of viewing a document that I would like to modify on rare occassion using word. I would like to create a document with MS Word, and then have my Access Application launch and display the document in a way that allows the user to view the document, but prohibits the document from being changed. I used HyperLink to attempt this, but the Word application is automatically launched, and the user can alter the document....
0
8428
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8339
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8751
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
7360
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6181
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5650
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4338
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2757
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
1739
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.