View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
alruff[_2_] alruff[_2_] is offline
external usenet poster
 
Posts: 1
Default What is best method of filling in fields on an MS Word Document?


I have a MS Word document in which I have put links to various cells i
an Excel worksheet. I print the MS Word document from Excel throug
VBA automation.

In MS Word I have checked "Update fields on Print", which updates th
fields when I issue wpApp.ActiveDocument.Printout

I am able to open the word document, and print it successfully. Th
problem I am having is that I need to print it 3,000 times as I cycl
through my code.

After about the 20 records MS Word generates an error message:

Word has insufficient memory. You will not be able to undo this actio
once it is completed. Do you want to continue? (Yes,No)

At this point I can only close winword, which leaves it running in th
background. So using task manager on the processes screen I kil
winword.exe, and then Excel crashes with:

Error #4248: This command is not available because no document i
open.

Anyone have an idea for a workaround? Or a better way to manager dat
transfer to Word (Bookmarks?)

Thanks in advance for your reply!!

Ala

--
alruf
-----------------------------------------------------------------------
alruff's Profile: http://www.excelforum.com/member.php...fo&userid=1500
View this thread: http://www.excelforum.com/showthread.php?threadid=26702