Common fax coding in msdn, ask for help

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • kuzure
    New Member
    • Dec 2006
    • 48

    Common fax coding in msdn, ask for help

    Dear friends,

    I had found this code and have questions need to ask.

    Dim objFaxServer As New FAXCOMEXLib.Fax Server
    Dim objFaxDocument As New FAXCOMEXLib.Fax Document
    Dim objFaxDevice As FaxDevice
    Dim ID As Long
    Dim objSender As FaxSender
    Dim JobID As Variant
    Dim a As Integer

    Code shown above is the declaration in the beginning of the code for faxing. I would like to know what is the "FAXCOMEXLi b"? And also the following code, I don't understand why need to use "As New". How does "As New" works?

    Besides, is there any DLL require? I saw the "Lib", looks like need to link with some kind of DLL for me, am I right?

    Hope someone can reply me as soon as possible.

    Best regards.
  • axtens
    New Member
    • Dec 2006
    • 32

    #2
    I would assume that "FAXCOMEXLib.Fa xServer" is a reference that has been added to the VB environment through the Project>Referen ces option. By doing this and then typing
    Dim x as New FAXCOMEXLib.Fax Server
    you are doing the same as
    Dim x as Object
    Set x = CreateObject( "FAXCOMEXLib.Fa xServer")
    just with less keystrokes. Also by adding the reference, the context sensitive help and code completion for the FAXCOMEXLib.Fax Server object become available.

    Kind regards,
    Bruce.

    Comment

    • kuzure
      New Member
      • Dec 2006
      • 48

      #3
      Dear Bruce,

      Thanks for replying me so soon.

      I had done the faxing code. I was simply modified and erased some unnecessary codes. It seems so easy because it just a few lines left, lesser than what msdn shown. Hope that wont make me looks plagiarizing, haha.

      However, thanks for your explanation. In this case, my code still consist of many "long" variable, I didnt use the advantage to decease the keystroke. Haha^^. I think I still need to understand how the code really works, some command in msdn's example do not occur in book.

      Although I got the solution, I still have many to learn. Well, we will meet again, here. And again, thank you very much.

      Best Regards,
      Kuzure

      Comment

      Working...