VBA ActiveDocument.Printout Append problem
- From: "DaveInLV via AccessMonster.com" <u18506@uwe>
- Date: Sun, 12 Feb 2006 19:55:05 GMT
I have Windows XP Pro and Office 2000 Premium.
I am creating MS-Word documents by modifying bookmarked areas in template
documents with data from a MS-Access query. I am using an application object
for this purpose.
Public objWord As Word.Application
When I create and save the documents separately with:
objWord.ActiveDocument.SaveAs DocSaveName
it works fine.
However, if I loop over the document generation routine and try to append
them all into a single file with:
If DocNo = 1 Then 'The first file
.ActiveDocument.PrintOut Background:=False, Append:=False, OutputFilename:
=DocSetSaveName, PrintToFile:=True
Else 'All other files
.ActiveDocument.PrintOut Background:=False, Append:=True, OutputFilename:
=DocSetSaveName, PrintToFile:=True
End If
then the output file is way oversized and MS-Word can't even read it. This
happens even if I have only one document.
Has anyone else encountered this problem?
Thanks.
Dave
--
Message posted via AccessMonster.com
http://www.accessmonster.com/Uwe/Forums.aspx/access-modules/200602/1
.
- Prev by Date: RE: How to Change Field Names to Numbers
- Next by Date: Re: Subtract one days reading from the next
- Previous by thread: RE: Trial period for app
- Next by thread: Creating table from Word VBA
- Index(es):