LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

integer codes for Excel FitToPagesWide ActiveX Needed

Hello,

I am currently using LV6.0.2 and have been doing some Excel controlling in my program. I don't have the tookit so I am been doing most the Excel stuff using direct ActiveX commands.

I have gotten everything working but I am having trouble getting the FitToPagesWide to work before printing. I am not sure if there is an interger code, but if I use a I32 witha value of 1 it does not work.

This is also with Excel 97.
Jeff D.

Certified Architect LabVIEW Champion DQMH Framework

0 Kudos
Message 1 of 4
(3,443 Views)
I have Excel 2003, but 1 is the correct setting. Try to also set the Zoom to False. Here is a snippet from the help:

If the Zoom property is True, the FitToPagesWide property is ignored.

Example
This example causes Microsoft Excel to print Sheet1 exactly one page wide and tall.

With Worksheets("Sheet1").PageSetup
.Zoom = False
.FitToPagesTall = 1
.FitToPagesWide = 1
End With

Michael Munroe
www.abcdef.biz
Michael Munroe, CLD, CTD, MCP
Automate 1M+ VI Search, Sort and Edit operations with Property Inspector 5.1, now with a new Interactive Window Manager!
Now supports full project automation using one-click custom macros or CLI.
0 Kudos
Message 2 of 4
(3,443 Views)
Thanks!!

At least I had the correct fit to page setting. I will try setting Zoom to false and see if that works.
Jeff D.

Certified Architect LabVIEW Champion DQMH Framework

0 Kudos
Message 3 of 4
(3,443 Views)
Thanks Again!!

I tried it this morning and it works perfectly. I knew I was close but I also knew i was missing something!
Jeff D.

Certified Architect LabVIEW Champion DQMH Framework

0 Kudos
Message 4 of 4
(3,443 Views)