Skip to content

How to use this component from VB6

Kees edited this page Aug 22, 2014 · 5 revisions

This project can also be used from a COM based language like VB script or VB6.

How do I do this:

  • Download the latest version
  • Open the MSGReader project
  • Make sure the Platform target is set to X86 (otherwise it won't work from VB6)
  • Build the code in release mode
  • Get the file "MsgReader.dll" from the BuildOutput folder
  • Copy the file to the location where you need it
  • Register the file for COM interop with the follow command

Regasm.exe /codebase MsgReader.dll

After that you can call it like this from VBA, VB6 and any other COM compatible language:

VBA or VB6 example:

dim msgreader set msgreader = createobject("MsgReader.Reader")

msgreader.ExtractToFolder "[inputfile]", "[outputfolder]", [true or false]

public string[] ExtractToFolder(string inputFile, string outputFolder, bool hyperlinks = false)

Clone this wiki locally