FsAutoComplete icon indicating copy to clipboard operation
FsAutoComplete copied to clipboard

IntelliSense doesn't work for Office interop assemblies

Open enricosada opened this issue 6 years ago • 1 comments

ref https://github.com/ionide/ionide-vscode-fsharp/issues/714

Consider the following code script:

#if INTERACTIVE
#r "Microsoft.Office.Interop.Outlook.dll"
#endif
open Microsoft.Office.Interop.Outlook

let getFullName userName =
    let outlook = ApplicationClass()
    let message = outlook.CreateItem(OlItemType.olMailItem) :?> MailItem
    message.Recipients.Add(userName) |> ignore
    message.Recipients.ResolveAll() |> ignore
    message.Recipients
    |> Seq.cast<Recipient>
    |> Seq.map (fun r -> r.AddressEntry.GetExchangeUser().Name)
    |> Seq.head

The project loading fails to resolve Microsoft.Office.Interop.Outlook

checked in vs2015 and load correctly.

It doesnt work with neither new project loader nor projectcracker

enricosada avatar Feb 19 '18 11:02 enricosada

Is this still an issue? The corresponding Ionide issue was closed.

For the above script, if you reference the DLL like below, it works fine for me:

#r @"C:\Program Files (x86)\Microsoft Visual Studio\Shared\Visual Studio Tools for Office\PIA\Office15\Microsoft.Office.Interop.Outlook.dll"

prosconi avatar Dec 28 '20 16:12 prosconi