set papersize in Navision for Excel

mstraubmstraub Member Posts: 25
Beloved Navision and Excel professionals ...

I try to set the paper size (A3, A4, letter, ...) of an Excel sheet in Navision depending on different parameters ... using the following statement:

XlWorkSheet.PageSetup.PaperSize := PaperSize;

BUT it doesn't work!

Any ideas?

Comments

  • garakgarak Member Posts: 3,263
    The easy way: start macro recording and see the VB Code. Then you know which classes (Automation) you need in navision.

    The papersize i change with following:
    XlActiveSheet.PageSetup.PaperSize = YourOptionOrIntegerVariable;
    

    is your variable "Papersize" an integer or option?

    or you define your own Papersize.

    Regards
    Do you make it right, it works too!
  • mstraubmstraub Member Posts: 25
    That was exactly the way ...

    PaperSize is an Integer var...

    I guess it is not possible but I am not sure.
Sign In or Register to comment.