Options

MS Outlook intergation with Version 4

Dean_AxonDean_Axon Member Posts: 193
Whilst using version 4 recently, I have noticed that the "allow Access" securtiy box no longer appears. I have checked the "Whats new" and found that the OLHandler.dll file has been fixed.

My questions are these....

Has anyone had the opportunity yet to find out what has been done different by MS that enables v4 to interact without the security window ?

Can I reverse engineer this for previous versions of navision ?

Do i just need to assign the new dll file into my previous versions ?

TIA.

Dean 8)
Remember: Keep it simple

Comments

  • Options
    pdjpdj Member Posts: 643
    I have heard the component has been completely re-written to use Extended MAPI in C++ instead of Simple MAPI in VB. I think the goal was to be able to use the new component instead of the old one. However; I doubt the were able to do it, or it would have been released with 3.70B :-(
    Regards
    Peter
  • Options
    Frank_RaemakersFrank_Raemakers Member Posts: 25
    For the previous versions you can use this little programm i found on internet.

    http://www.contextmagic.com/express-clickyes

    Try it?

    Frank
  • Options
    Dean_AxonDean_Axon Member Posts: 193
    Hi Frank,

    Have used this before and it works fine. My main concern though is that some other program may try to use my outlook client and this program quite happily allows it to do so as it automatically ticks YES 8-[

    Not too sure on how secure this makes my systems :-k

    Dean
    Remember: Keep it simple
  • Options
    Dmitry_ChadaevDmitry_Chadaev Member Posts: 52
    Hi Dean,

    You can try Outlook Security Features Administrative Package:
    http://download.microsoft.com/download/OfficeXPProf/Install/5.0.2920.0.1/W98NT42KMe/EN-US/ADMPACK.EXE

    It is possible to setup trusted applications using it - so that Outlook would treat Navision as its own brother :)

    Read more here:
    http://office.microsoft.com/en-us/assis ... 51033.aspx
    http://gtdsupport.netcentrics.com/downl ... 2XPSP3.pdf
    Best regards,
    Dmitry
  • Options
    StyvieStyvie Member Posts: 77
    Hi,

    Just wondered if you ever managed to get this right in a previous version of Navision.

    I have used the new mail codeunit from version 4.0 and successfully used it in Navision 3.7. The only problem I have is that it does not work on machines unless version 4.0 has been installed.

    I have tried to register the OLHanlder.dll and the OLWrapper and the OLaddin file but have not had any luck getting this codeunit to work.... I get the error "Could not create an instance of etc...." as if the automation server is not registered.

    I have checked the virtual table "Automation Servers" on both a machine where version 4.0 has been installed and one where i have registered the controls manually, and the GUID, version , everything looks fine, and the codeunit compiles in Navision 3.7 (on machine where 4.0 has NOT been installed), but I still get the error when trying to send mail...


    Has anybody come right doing this ?
  • Options
    PidiPidi Member Posts: 35
    here is, what I did:

    I registered the OLHandler.dll
    and used the following code

    Variables:

    Name DataType Subtype Length
    OApplication Automation 'NS Outlook Synchronization Handler'.OApplication
    OAttachment Automation 'NS Outlook Synchronization Handler'.OAttachment
    OAttachments Automation 'NS Outlook Synchronization Handler'.OAttachments
    OSendMail Automation 'NS Outlook Synchronization Handler'.OSendMail
    BSTRConverterBody Automation 'Navision Attain Hash 1.0'.BSTRConverter
    BSTRConverterAttachFileName Automation 'Navision Attain Hash 1.0'.BSTRConverter
    HideDialog Boolean
    ErrorNo Integer

    Function:

    NewMessage(ToName : Text[80];CCName : Text[80];Subject : Text[260];Body : Text[260];AttachFileName : Text[260];OpenDialog : Boolean) MailSent : Boolean

    IF ISCLEAR(OApplication) THEN
    CREATE(OApplication);

    IF (NOT OApplication.Logon(TRUE,'','',FALSE,FALSE)) THEN BEGIN
    OApplication.Logoff;
    EXIT
    END;

    IF ISCLEAR(OSendMail) THEN

    CREATE(OSendMail);

    ErrorNo := 0;

    OSendMail."To" := ToName;
    OSendMail.CC := CCName;
    OSendMail.Subject := Subject;

    {
    IF ISCLEAR(BSTRConverterBody) THEN
    CREATE(BSTRConverterBody);

    IF Body <> '' THEN BEGIN
    BSTRConverterBody.ResetBSTR;
    BSTRConverterBody.AppendNextStringPortion(Body);
    END;
    OSendMail.Body := BSTRConverterBody;
    }


    IF ISCLEAR(BSTRConverterAttachFileName) THEN
    CREATE(BSTRConverterAttachFileName);

    {
    IF AttachFileName <> '' THEN BEGIN
    BSTRConverterAttachFileName.ResetBSTR;
    BSTRConverterAttachFileName.AppendNextStringPortion(AttachFileName);
    OAttachments := OSendMail.Attachments;
    OAttachment := OAttachments.Add(BSTRConverterAttachFileName);
    END;
    }

    OSendMail.OpenDialog := OpenDialog; // if parameter is FALSE, the mail will be sent without any kind of message or alert !

    MailSent := OSendMail.Send;
    ErrorNo := OSendMail.ErrorStatus;
    OApplication.Logoff;

    surprisingly pretty simple.
    Unfortunately I have no idea, what the BSTRConverter AC is good for,
    and no time yet, to figure it out.

    Pidi
    Michael Peters
    Bos Fod GmbH Düsseldorf
    +49 2132 139-0
  • Options
    PidiPidi Member Posts: 35
    Ooops - forgot to mention, that I used the described function from within
    an Attain 3.6 environment.

    Pidi
    Michael Peters
    Bos Fod GmbH Düsseldorf
    +49 2132 139-0
Sign In or Register to comment.