Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Visual Basic > VB 6 Visual Basic 6 > Pro VB 6
|
Pro VB 6 For advanced Visual Basic coders working in version 6 (not .NET). Beginning-level questions will be redirected to other forums, including Beginning VB 6.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Pro VB 6 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old January 23rd, 2004, 01:50 PM
Registered User
 
Join Date: Jan 2004
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default Processing a list of word documents from VB

I am trying to process the list of word files in a user specified directory. For this I iterate through the list of documents and open each using the Word.Application & Word.Document objects.

Now sometimes the word file may be corrupted or might have macros. In this case when executing the

`Set wrdDoc = wrdApp.Document.Open(...)`

statement, the Microsoft Word application generates an error, and the VB program CANNOT proceed until the user responds to the (error related) message box the word app displays. However i want to ignore these errors, skip these files and continue processing the rest of the documents. The key requirement is that no user intervention should be necessary.

Please help.
 
Old February 5th, 2004, 12:02 PM
Friend of Wrox
 
Join Date: Aug 2003
Posts: 205
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Offhand the only idea that comes to mind is to have a program that sends mouseclicks if the document fails to close properly.
 
Old February 16th, 2004, 09:24 AM
Authorized User
 
Join Date: Aug 2003
Posts: 44
Thanks: 0
Thanked 0 Times in 0 Posts
Default

How about:
On Error Resume Next





Similar Threads
Thread Thread Starter Forum Replies Last Post
how to compare two word documents using full text connect2sandep SQL Server 2005 1 October 7th, 2008 07:26 AM
assigning macros to word documents dynamically x_ray C# 0 May 30th, 2006 10:29 AM
Inserting Word Documents into Access showie Access VBA 4 December 14th, 2005 02:02 PM
ASP and word documents Nicky2k Classic ASP Databases 1 August 11th, 2005 04:11 PM
comparision of two word documents anuradhad VB How-To 1 July 24th, 2004 04:10 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.