|
|
||||||
|
#1
|
|
|
|
|
How do you find the numeric value of a built-in dialog box, such as:
Dialogs(1347).Show to display the Modify Style dialog box? I am interested in accessing the Fill Effects dialog box to set the Lock Aspect Ratio for an inserted picture. Thanks, kc |
|
|
|
#2
|
|
|
|
|
Where do you find "Lock Aspect Ratio" in the Fill Effects dialog box? Don't
you mean in the Size tab of the Format Picture dialog box? Note that you do not need to access the dialog box in order to change the "Lock Aspect Ratio" setting. For example, you can set the value to true like this (in case of floating shapes, use "Shapes" instead of "InlineShapes"): ActiveDocument.InlineShapes(1).LockAspectRatio = msoTrue About the built-in dialog boxes: Almost all of the built-in dialog boxes have a constant name, "wdDialog[xxx]" (e.g. "wdDialogFileNew" for File > New). For a list of the names, see the VBE help on "Built-in Dialog Box Argument Lists". When reading the VBA code, it is much easier to identify dialog boxes by their names than by their numbers. See also the article "Getting help with calling Word's built-in dialogs using VBA (and why doing so can be much more useful than you'd think)": http://www.word.mvps.org/FAQs/MacrosVBA/WordDlgHelp.htm |
|
#3
|
|
|
|
|
Thnaks, Lene for you response. The article had some helpful suggestions, but
was unable to provide me with what I need. The Lock Aspect Ratio is available on the Picture tab of the Fill Effects dialog box. It is only available after you select the picture to insert. It is not avaiable with the Selection.ShapeRange.Fill object, so I thought I would try accessing the dialog box directly to set it. The Fill Effect dialog box is not one the Word built-in dialog boxes with a named constant. I found a discussion thread that dealt with accessing dialog boxes that didn't have named constant by referencing the number of the dialog box, such as Dialogs(1347).Show to display the Modify Style dialog box (the example in the thread). I was wondering how I could find out what the reference number was for the Fill Effects Dialog box, or any other dialog boxes I may have need of in the future. Thanks, kc "Lene Fredborg" wrote: [..] |
|
#4
|
|
|
|
|
FWIW, the LockAspectRatio property is defined for Shape and InlineShape
objects. For example: Selection.InlineShapes(1).LockAspectRatio = msoFalse turns off the option for the first InlineShape object in the selection. (The property can be used analogously with Shape objects.) |
|
|
| Similar Threads | |
| Code to open built-in dialog boxes in Access Using Office 2003 and Windows XP; Could someone please post generic example code to programmatically open a built-in MS-Access dialog box? In particular I would like to be... |
|
| How to find names for built-in dialog boxes Is the list that comes up in the VB Editor as you type Dialogs( the full list available? In particular, I'm trying to find out how to call the "Modify Style"... |
|
| Using built in dialog boxes - how to determine arguments? How do I find out what the arguments/members of a given Word.Dialog are? I can invoke them fine using the code from: [..], and I can get some information on member names... |
|
| Built-in Dialog Boxes Is there anyway you can display dialog boxes using VBA. For example, would like to display the Save As dialog box, if a presentation has no already been saved, just before... |
|
| Re : Making use of the Built-in Dialog Boxes 1. Please examine the following code :- Dim TextFind As String Call Application.Dialogs(xlDialogFormulaFind).Show(TextFind, 2, 2, 1, 0, True, True) MsgBox "TextFind = " &... |
|
|
All times are GMT. The time now is 09:04 PM. | Privacy Policy
|