AddIn with a dialogBox for ms-word (C++)

Hi all, I wrote (C++) an addIn for ms-word and I wish to add an "Options" dialogBox with tabs to it.
Ms-word uses the bosa_sdm_Microsoft class to create such an "Options"-dialogBox (window).

I use GetProperty(..."Windows"...) and CallMethod(..."Add"...) with variant variables in order to get the "Windows" collection and then to "Add" a new bosa_sdm_Microsoft dialog-window to it.

The problem is that CallMethod returns an exception saying: wrong parameter.
How can I know (in general) which parameters are required and should be passed with the variant in order to add a resource such as a dialog.
For example to create a new commandButton I only need to pass bstr string - noting more! (i set the rest of the properties later)-- but I know that ONLY after seeing it in an example. How, did the programer of the example knows it and how can i know it without examples.

---
Any help or link to help will be appreciated.
Best regards,
Tamir.


Answer this question

AddIn with a dialogBox for ms-word (C++)

  • dougn

    Hi Tamiri

    This is really the wrong place to ask your question, I'm afraid. VSTO is a specific technology, available for VB and C#, so you're unluckly to meet any C++ folks, here.

    Technically, the correct place to ask would be

    http://msdn.microsoft.com/newsgroups/default.aspx dg=microsoft.public.office.developer.com.add_ins&lang=en&cr=US

    On re-reading your question a few times, it sounds as if you want to display a built-in Word dialog box The operative method, then, is SHOW. In native Word VBA speak:

    Application.Dialogs(wdDialogToolsOptions).Show

    so you probably also need to get the correct wdDialog Enum (or its value). In this case, the Object Browser in the Word VBA IDE can help you. Start Word, press Alt+F11 (to start the IDE), then F2 to open the object browser.



  • AddIn with a dialogBox for ms-word (C++)