Excel template has no pagesetup when opening from VB

Y

yumyum

Could anybody help me how to get back the pagesetup of a template?

I have a VB application to create a workbook from a template.
When I launch the from VB, it works fine to get back the pagesetup from
the template with:

oWorkBook=oExcelApp.WorkBooks.Open (Filename:="myWorkbook.xlt",
Edittable:=False)

oWorkBook.Sheets(1).PageSetup.LeftHeader containes the defined header
from the template


But when I launch the compiled EXE
oWorkBook.Sheets(1).PageSetup.LeftHeader containes an empty string.

Any idea?

Thanks for any help!
 
Top