Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Word / Programming / January 2007

Tip: Looking for answers? Try searching our database.

WORD Automation Frustrations

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Enrique Rojas - 08 Jan 2007 13:38 GMT
I need some advice on what to do for this project.

There has been VBA code written in Access to generate Word documents.
It works wonderfully. I was given the task to copy this functionality
on the web with ASP.

I managed to do it except that inconsistent errors are crop up every 2
or 3 times when runned. The main crux of this application is that it
generates tables from the database.

It seems to me that Word halts when you ask it to generate large tables
in the document.

I have been pulling my hairs and have not left work in 24 hours just to
figure out this thing.

Is there another solution I can implement that will allow me to
generate word documents from a database downloadable for the users.

PS: The documents are pulled from a template pool based on an ID
specific to the department. Queries are made based on department ID.

I was thiking of making a dll that the asp page will pass on the
parameters and word document will be generated.

Any advice would be welcomed. It would be ideal if i can salvage the
code i have now and get that to work.

Sorry I am rambling i need to sleep.
Malcolm Smith - 08 Jan 2007 17:16 GMT
Word chokes if you ask it to do too much from another application.

I have a routine which I call every now and then from the calling
application which seems to sort out this problem.  The title seems to be
self explanatory.

I use it for my daily report runs and without it it wouldn't work.

There's just two arguments being passed, a pointer to the Word application
and a pointer to the Document.

Hope that this helps.

- Malc

Private Sub PreventWordDeath(moWord As Word.Application, objDoc As
Word.Document)
 
 On Error Resume Next

 DoEvents

 objDoc.UndoClear
 objDoc.Repaginate
 
 DoEvents

 moWord.Options.Pagination = False
 With moWord.Application
   .ScreenUpdating = True
   .ScreenRefresh
   .ScreenUpdating = False
 End With
 
 DoEvents
   
End Sub

> *From:* "Enrique Rojas" <enrique.rojas@gmail.com>
> *Date:* 8 Jan 2007 05:38:45 -0800
[quoted text clipped - 28 lines]
>
> Sorry I am rambling i need to sleep.
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.