M
Microsoft News
Hello,
I have the following problem: I want to manually display a built-in dialog
box from a COM-addin in Word [2003] and get/set some of the dialog's
parameters. From MSDN the only information that I could find was this:
Sub test()
Dim dlg As Dialog
Set dlg = Dialogs(wdDialogFileSaveAs)
dlg.Name = "whatever.doc"
dlg.Show
End Sub
This seems to work (also from a Word macro). But I need to do this from C++
and I cannot figure out how to get to the Name (and other) properties of a
built-in dialog. What I am doing:
CComQIPtr<Word:ialogs> ptrDialogs = m_ptrApplication->Dialogs;
CComQIPtr<Word:ialog> ptrSaveAsDlg = ptrDialogs->Item(wdDialogFileSaveAs);
then I'm stuck, because all the dialogs are of the same type and none has a
Name property. Apparently these are the properties supported by the SaveAs
dialog:
Name, Format, LockAnnot, Password, AddToMru, WritePassword,
RecommendReadOnly, EmbedFonts, NativePictureFormat, FormsData,
SaveAsAOCELetter, WriteVersion, VersionDesc, InsertLineBreaks,
AllowSubstitutions, LineEnding, AddBiDiMarks
But where are they stored? Anyone knows this? Any help would be greately
appreciated.
Thanks and best regards,
Levente
I have the following problem: I want to manually display a built-in dialog
box from a COM-addin in Word [2003] and get/set some of the dialog's
parameters. From MSDN the only information that I could find was this:
Sub test()
Dim dlg As Dialog
Set dlg = Dialogs(wdDialogFileSaveAs)
dlg.Name = "whatever.doc"
dlg.Show
End Sub
This seems to work (also from a Word macro). But I need to do this from C++
and I cannot figure out how to get to the Name (and other) properties of a
built-in dialog. What I am doing:
CComQIPtr<Word:ialogs> ptrDialogs = m_ptrApplication->Dialogs;
CComQIPtr<Word:ialog> ptrSaveAsDlg = ptrDialogs->Item(wdDialogFileSaveAs);
then I'm stuck, because all the dialogs are of the same type and none has a
Name property. Apparently these are the properties supported by the SaveAs
dialog:
Name, Format, LockAnnot, Password, AddToMru, WritePassword,
RecommendReadOnly, EmbedFonts, NativePictureFormat, FormsData,
SaveAsAOCELetter, WriteVersion, VersionDesc, InsertLineBreaks,
AllowSubstitutions, LineEnding, AddBiDiMarks
But where are they stored? Anyone knows this? Any help would be greately
appreciated.
Thanks and best regards,
Levente