none
how can i access and change lable in the word dialog box RRS feed

Answers

  • This is not possible using the Word object model. The dialog boxes are not exposed to the developer.
    Cindy Meister, VSTO/Word MVP
    • Marked as answer by Bessie Zhao Wednesday, January 19, 2011 5:58 AM
    Wednesday, January 12, 2011 1:08 PM
    Moderator
  • I suppose that would depend on which dialog box - you could for example change the title bar of  the File Open dialog?

    Dim oDoc As Document
    Dim fDialog As FileDialog
    Set fDialog = Application.FileDialog(msoFileDialogOpen)
    With fDialog
        .Title = "Select Required Document and click OK"
        .AllowMultiSelect = False
        .InitialView = msoFileDialogViewList
        If .Show <> -1 Then
            MsgBox "Cancelled By User", , _
                   "List Folder Contents"
            Exit Sub
        End If
        Set oDoc = Documents.Open(.SelectedItems.Item(1))
    End With

    It may also be possible to replace the built-in dialog with a userform to achieve the same ends.



    <Cindy Meister [MVP]> wrote in message news:d492802e-8f95-4d25-b2e7-a040a9343eb0@communitybridge.codeplex.com...

    This is not possible using the Word object model. The dialog boxes are not exposed to the developer.
    --------------------------------------------------------------------------------
    Cindy Meister, VSTO/Word MVP


    Graham Mayor - Word MVP
    www.gmayor.com
    Posted via the Communities Bridge
    http://communitybridge.codeplex.com/
    • Marked as answer by Bessie Zhao Wednesday, January 19, 2011 5:58 AM
    Wednesday, January 12, 2011 1:34 PM

All replies

  • This is not possible using the Word object model. The dialog boxes are not exposed to the developer.
    Cindy Meister, VSTO/Word MVP
    • Marked as answer by Bessie Zhao Wednesday, January 19, 2011 5:58 AM
    Wednesday, January 12, 2011 1:08 PM
    Moderator
  • I suppose that would depend on which dialog box - you could for example change the title bar of  the File Open dialog?

    Dim oDoc As Document
    Dim fDialog As FileDialog
    Set fDialog = Application.FileDialog(msoFileDialogOpen)
    With fDialog
        .Title = "Select Required Document and click OK"
        .AllowMultiSelect = False
        .InitialView = msoFileDialogViewList
        If .Show <> -1 Then
            MsgBox "Cancelled By User", , _
                   "List Folder Contents"
            Exit Sub
        End If
        Set oDoc = Documents.Open(.SelectedItems.Item(1))
    End With

    It may also be possible to replace the built-in dialog with a userform to achieve the same ends.



    <Cindy Meister [MVP]> wrote in message news:d492802e-8f95-4d25-b2e7-a040a9343eb0@communitybridge.codeplex.com...

    This is not possible using the Word object model. The dialog boxes are not exposed to the developer.
    --------------------------------------------------------------------------------
    Cindy Meister, VSTO/Word MVP


    Graham Mayor - Word MVP
    www.gmayor.com
    Posted via the Communities Bridge
    http://communitybridge.codeplex.com/
    • Marked as answer by Bessie Zhao Wednesday, January 19, 2011 5:58 AM
    Wednesday, January 12, 2011 1:34 PM
  • thanks graham could you please give me c# code sample

    amir
    Wednesday, January 12, 2011 3:02 PM
  • Hi AmirSamani,

    Thanks for posting in the MSDN Forum.

    Here is an “all-in-one code” sample for customization Dialog which is written by C#. You can find more information in this sample project. I Hope it helps. Here is the Url: http://www.codeproject.com/KB/dialog/OpenFileDialogEx.aspx

    Have a great day,

    Tom Xu


    Tom Xu [MSFT]
    MSDN Community Support | Feedback to us
    Get or Request Code Sample from Microsoft
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    Tuesday, January 18, 2011 3:23 AM
    Moderator