John W Colby
jwcolby at gmail.com
Wed Oct 16 10:11:30 CDT 2013
Gustav, But objects cannot be dimensioned withevents. It seems that Mark wants late binding but withevents... Withevents requires early binding I found this: http://stackoverflow.com/questions/12305736/late-binding-events Which discusses simply referencing the oldest possible version of the object (outlook in this case) that will ever be encountered. I have no idea whether this will actually work or not. It also means that you have to have that oldest version installed and we all know that outlook in particular wants to uninstall the older versions before installing later versions. Issues like that. John W. Colby Reality is what refuses to go away when you do not believe in it On 10/16/2013 10:58 AM, Gustav Brock wrote: > Hi Mark > > Dim oSync As Object > > ? > > /gustav > > -----Oprindelig meddelelse----- > Fra: accessd-bounces at databaseadvisors.com > [mailto:accessd-bounces at databaseadvisors.com] På vegne af Mark Simms > Sendt: 16. oktober 2013 14:45 > Til: 'Access Developers discussion and problem solving' > Emne: [AccessD] Interesting VBA problem > > I've got an AC2010 app that must use late-binding. > I'm an instantiating an Outlook session. > However, I need to reference a SyncObject WithEvents. > However, what do I Dim it as ? > Private oSync WithEvents as Outlook.SyncObject > > Tried Private oSync WithEvents as EventObject By the compiler complained ! > > Dim oSync as Access.CustomControl > > That worked, but the call back will probably fail, correct ? > > Someone said it might work if I: > Set oSync = CreateObject("Outlook.SyncObject") > >