Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello
I have researched on the internet and have found the following code:
SUB FitZoomToWindow
ActiveDocument.ActiveSheet.FitZoomToWindow
ActiveDocument.ActiveSheet.ApplyZoomToAllSheets
END SUB
However this does not seem to be working in my button which I ahve assigned the macro too
I understand the above script to be VBScript, I am running this off our server which has Excel 2007 installed. I know that Microsoft have stopped external uses for running vbscript in Excel 2007, could this be why the macro is not working for me?
Has anyone else experienced the syntex not running, and how they overcame this problem?
Thanks
Helen
Hi Helen
try this macro:
SUB Zoom
set CurrentSheet=ActiveDocument.ActiveSheet
set proper=CurrentSheet.GetProperties
proper.ZoomFactor = 1 ' try 1 to 4
CurrentSheet.SetProperties proper
END SUB
Hey,
I had the same problem and found the answer there:
http://www.qlikblog.at/444/qliktip-16-zoom-mit-makro-automatisieren/
The tricky point is to add the following line between the commands:
ActiveDocument.ActiveSheet.FitZoomToWindow
ActiveDocument.GetApplication.WaitForIdle
ActiveDocument.ActiveSheet.ApplyZoomToAllSheets
ActiveDocument.GetApplication.WaitForIdle
I hope that helps!