Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Code to close created mdi file

Status
Not open for further replies.

APElliott

Technical User
Jul 9, 2002
165
GB
Hi,

I have some code that prints from a excel pivot table to create and save as a mdi file.

The code can loop upto 60 times creating 60 files.

However when it creates the mdi files they are left open and no more can be created when the number of mdi files reaches 10.

I'm hoping there is a small code that will close these files that are named as follows:

'Print the enquiry
Application.ActivePrinter = "Microsoft Office Document Image Writer on Ne00:"

ActiveSheet.PrintOut Copies:=1, PrintToFile:=True, Collate _
:=True, PrToFileName:="\\server007\BConstruct\Estimating\Shared\Andy Elliott, Backups\02.Tenders\Subcontractor Enquiries\" & Left(ActiveWorkbook.Name, 4) & " " & [L1] & " " & [M1] & ".mdi"

I hope I've made sense!

Cheers,

Andrew
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top