Yahoo Answers is shutting down on May 4th, 2021 (Eastern Time) and the Yahoo Answers website is now in read-only mode. There will be no changes to other Yahoo properties or services, or your Yahoo account. You can find more information about the Yahoo Answers shutdown and how to download your data on this help page.

How can I support .doc files in my vb application?

I am preparing a word processor project to support various formats like pdf, doc...how can I open a doc application in my application itself and not as separate document that opens up in ms word!

1 Answer

Relevance
  • 1 decade ago
    Favorite Answer

    You have to add an ActiveX Control named Common Dailog Control in your control box. You can use its Filter Property to use different file types like .doc,.pdx,etc.

    The Common Dialog Control provides a standard interface for operations such as opening, saving, and printing files or selecting colours and fonts using the Microsoft Windows dynamic link library COMMDLG.DLL. The Control is visible on the form as an icon at design-time but not at run-time. The icon cannot be resized on the form and it's not possible to specify where the Dialog will be displayed when opened.

    To use a Common Dialog Control, add "Microsoft Common Dialog Control" from the "Project", "Components" menu item. The three-letter mnemonic for a Common Dialog Control is "cdl". The Control's Methods are used to determine which dialog is displayed.

    EXAMPLE:

    The Filter Property is used to determine the types of file to be shown. A Pipe symbol, |, is used to separate the description and value.

    cdlOpen.Filter = "Text (*.txt)|*.txt"

    Source(s): VB Developer,MCSD
Still have questions? Get your answers by asking now.