How can I set the size property of an OWC control?

diegoo

New Member
Joined
Dec 22, 2005
Messages
6
I am publishing a spreadsheet as an HTML page displayed using Office Web Components. Is there any way I can set the size of the page that is displayed? Actually, thinking about it the question really is: can I set the size of the OWC control on the client's system so that when they open the published page they will always see a set number of columns and rows? Any hlp with this is appreciated... :biggrin:
 

Excel Facts

Copy formula down without changing references
If you have =SUM(F2:F49) in F50; type Alt+' in F51 to copy =SUM(F2:F49) to F51, leaving the formula in edit mode. Change SUM to COUNT.
This is how I resolved my problem. I first published the spreadsheet as a web page and the applied the following code.

Code:
[img]/intranet/images/icons/clear.gif[/img]
<SCRIPT language=vbscript>

Sub CustomizeToolbar()
   Dim tb
   Dim iCtr
   Dim sButtonName
   Dim ssConstants
    
   Const CMD_PREFIX = "owc"
    
   Set ssConstants = CompensationAS_18714_Spreadsheet.Constants

   ' Set a variable to the Spreadsheet control's toolbar.    
   Set tb = CompensationAS_18714_Spreadsheet.Toolbar
    
   ' Call a procedure that removes all commands from the toolbar.
   ClearToolbar tb
   CompensationAS_18714_Spreadsheet.DisplayHorizontalScrollBar = False
   CompensationAS_18714_Spreadsheet.DisplayVerticalScrollBar = false
   CompensationAS_18714_Spreadsheet.Height = 800
   CompensationAS_18714_Spreadsheet.Width = 450
   CompensationAS_18714_Spreadsheet.DisplayRowHeadings = false
   CompensationAS_18714_Spreadsheet.DisplayColumnHeadings = false
   CompensationAS_18714_Spreadsheet.DisplayToolbar = false
   CompensationAS_18714_Spreadsheet.DisplayTitleBar = false
   CompensationAS_18714_Spreadsheet.DisplayWorkbookTabs = false

   
   'Set a variable to the name of the Copy button. 
   'sButtonName = CMD_PREFIX & ssConstants.ocCommandCopy
   
   ' Add the Copy button ot the toolbar. 
   'tb.Buttons.Add tb.Buttons.Count + 1, sButtonName, , 0, sButtonName
   
   ' Set a variable to the name of the Paste button. 
   'sButtonName = "owc" & ssConstants.ocCommandPaste

   ' Add the Copy button ot the toolbar. 
   'tb.Buttons.Add tb.Buttons.Count + 1, sButtonName, , 0, sButtonName

End Sub

Sub ClearToolbar(Toolbar)

   For iCtr = 1 To Toolbar.Buttons.Count
       Toolbar.Buttons.Remove 1
   Next

End Sub

CompensationAS_18714_Spreadsheet.ActiveWindow.ScrollIntoView 0, 0, 0, 0


</SCRIPT>
 
Upvote 0

Forum statistics

Threads
1,214,927
Messages
6,122,311
Members
449,080
Latest member
jmsotelo

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top