With a VBA macro it is easy to open an msexcel or msword file with the window on a fixed place on the screen, f.i. top left corner, and a size one wants. Is the same possible with msoutlook? I do not get further then olMinimized, olMaximized and olNormalWindow.
Problem solved via this link: Userform Positioning in Outlook Thank you Axcel for pointing me in the right direction.
The Explorer and Inspector classes from the Outlook object model provide the Width, Height, Top and Left properties that can be set at runtime.
Related
In Word, when right-clicking over a canvas frame, there is a fit option. How to execute this programmatically in VBA? I can't find the method in documentation.
It appears to have been left out of the object model, like the rest of the Canvas-specific right-click commands. You may be able to work around it with this, it assumes that Shapes(1) is the drawing canvas:
With ActiveDocument.Shapes(1)
CommandBars.ExecuteMso "DrawingCanvasFit"
End With
I have a simple excel form with an ActiveX control (ListBox)
When I share this over email, the recipient does the following steps:
1. Open the excel
2. Enable Content for the macro
Now - the ListBox grows in size.
I'm unable to dynamically resize or figure out the exact event for "Enable Content".
Is there anyway I can retain the dimensions of the ListBox?
Your problem has nothing to do with sharing the document via email. It has everything to do with window scaling. To prove this to yourself try connecting to a projector with the the excel document open. Use some Active X controls and they will shrink or Expand. I've had this problem and found the only way to avoid it in a reasonable manor is to implant a form inside the excel document that holds all the needed controls or ensure the end user is not scaling their display in any manor.
I have a complex network diagram and I have connected the "important" shapes to a database. What I can't find is a way to display the shape data when I save the diagram as html. Using any combination of options in the save as, produces only a basic vertical menu area on the left side, that does exactly NOTHING in IE.
Chrome gives me a brief tool-tip, and the menu will re-display the page. Firefox does best, I get a pan and zoom area in the left side menu. There is even a "Details" area below that with the comments "Ctl+Click to see shape data". It does not work on any of the shapes that actually have data.
I'm beginning to think its a blocked content restriction in the browser. Ideas please!!
Try this add-in HTML Export by Nikolay
At Nikolay's personal site (unmanagedvisio.com) you can find few articles about this add-in.
PS You can't change this shape data when use this add-in !
I'm working on a workbook in Excel 2010 that someone else created (I don't know which version they were using) with a button in it that invokes a macro. There are a lot of macros defined, so I'm right-clicking on it to find out which one it calls, but the context menu doesn't appear. Instead, when I click off, the button gets larger. I can make this happen as many times in a row as I'd like. There is another button the same worksheet that has the same context menu problem, but instead of growing, the text shrinks each time. There is another button that functions normally when I do this.
Growing buttons in Excel is a fairly common issue, with several theories about why this happens, including the use of multiple monitors or using proportional fonts. I have yet to see a definitive answer about this, but there are several workarounds that may work for you.
Delete and re-create the buttons.
Programmatically set the height and width of the buttons when the workbook is opened and when a button is clicked.
Select the button with another object or two on the sheet and group them.
Don't use them at all.
My personal choice is #4. As an alternative to buttons, I either use hyperlinks or shapes with macros assigned to them.
I think you want to enter "Design Mode" in the work book:
You should be able to right-click on the button to see what it does after that.
I have this same issue. I have two Excel workbooks with similar buttons on each. This only happens on one of them, but it happens every time I open that file.
I have found a sort of work-around. I open a blank Excel document, then I open the affected one and the buttons do not change size any more. When I open the second one, I have to drag it into the window with the already-open file. If I double-click on it, it opens in a new window and the problem remains.
I have the same issue sometimes. In my case, I could replicate it 100% on one file but it was inconsistent on an virtually identical file. I also found the size error wasn't permanent -- I could save and reopen the file to restore the button's appearance. I could also create a new window and then discard the damaged window.
For me, the button resized when I accessed the sheet's HPageBreaks collection. I was able to avoid the problem by temporarily changing the window view as follows:
ActiveWindow.View = xlPageBreakPreview
' do pagination stuff using HPageBreaks
ActiveWindow.View = xlNormalView
I have a report in Access 2007 that is opened by pressing a button on a form. This button triggers an OpenReport macro, where the report is told to open in Print Preview view, and Dialog window mode.
How can I manually set the size of this window, along with the opening zoom level?
In the properties of the report, both AutoResize and FitToPage have been set to No. However, I have tried other combinations and had no luck.
Any help is much appreciated.
You could always set the windows position and size in the OnOpen event. Use the SetWindowPos function to do this. You can find out how to use it here.
I don't think there is a way to set the zoom level.
This is a two part solution.
First, in order to resize your window you must set the Document Window Options to "Overlapping Windows" located under Access Options then CUrrent Database.
Now you will be able to resize your dialog window.
Once you are done, save the form and verify it's the size you want by opening it.
If you prefer to have a tabbed document rather than overlapping window you can switch back now and it will retain the correct dialog size.
It's a little convoluted but it works.