Printing Excel workbooks from access vba

I

igniztion

Hi,

I need to print Excel workbooks from an access vba application, and
usually this works without any troubles. In some cases though, when
running

oExcel.Application.ActiveWorkbook.WorkSheets(arr).PrintOut

where the array contains the names of all visible sheets in the
workbook, some of the sheets don't print. I've checked that the names
are correct in the array. I've also tried different functions like
ActiveWorkbook.Printout, ActiveWindow.SelectedSheets.Printout (when I
know that all the sheets are selected) etc

For some reason they don't want to print. If I open the excel doc
manually and prints the workbook then every visible sheet is printed.

Does anyone have any idea what can be done to avoid this, or is it
something done in the creation of the Excel docs perhaps? (Can't really
do much about that. We have around 60 people all over Europe creating
these documents)
 
C

Cindy M -WordMVP-

Since you haven't gotten any response in this group, you might try asking
in the Excel-specific group:

http://msdn.microsoft.com/newsgroups/default.aspx?dg=microsoft.public.exc
el.programming&lang=en&cr=US
I need to print Excel workbooks from an access vba application, and
usually this works without any troubles. In some cases though, when
running

oExcel.Application.ActiveWorkbook.WorkSheets(arr).PrintOut

where the array contains the names of all visible sheets in the
workbook, some of the sheets don't print. I've checked that the names
are correct in the array. I've also tried different functions like
ActiveWorkbook.Printout, ActiveWindow.SelectedSheets.Printout (when I
know that all the sheets are selected) etc

For some reason they don't want to print. If I open the excel doc
manually and prints the workbook then every visible sheet is printed.

Does anyone have any idea what can be done to avoid this, or is it
something done in the creation of the Excel docs perhaps? (Can't really
do much about that. We have around 60 people all over Europe creating
these documents)

Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update Jun 17 2005)
http://www.word.mvps.org

This reply is posted in the Newsgroup; please post any follow question or
reply in the newsgroup and not by e-mail :)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top