Using Automation withevents

Bastiki
Member Posts: 11
Hi there,
it might be possible that anyone else already had this problem.
I want to do some automation with Outlook.
The olExplorer-Variable is set up with "WITHEVENTS = YES". But when trying to compile this piece of code an error occurs saying that it's not permitted to assign something to a variable that is withevents-activated.
Now the question is, is there any way to do this thought? I really need the SELECTIONCHANGE-Event from the Explorer-Object.
Thanx in advance for any suggestion.
it might be possible that anyone else already had this problem.
I want to do some automation with Outlook.
CREATE(olApp); olFolder := olApp.GetNamespace('MAPI').GetDefaultFolder(5); olExplorer := olApp.Explorers.Add(olFolder,0);
The olExplorer-Variable is set up with "WITHEVENTS = YES". But when trying to compile this piece of code an error occurs saying that it's not permitted to assign something to a variable that is withevents-activated.
Now the question is, is there any way to do this thought? I really need the SELECTIONCHANGE-Event from the Explorer-Object.
Thanx in advance for any suggestion.
0
Comments
-
Try to use instead of the event property:
'Microsoft Outlook 12.0 Object Library'.ExplorerEventsDo you make it right, it works too!0 -
Thanks a lot for this. but I think I forgot to say, that I already had this idea. But there are two things that made me think that this would be no solution
1. Accodring to Microsoft, the ExplorerEvents are intended for internal use
2. How would I assign the ExplorerEvents to react on the Events of my Explorer-Object?
The worst thing is, that it's not possible to "CREATE" the Explorer-Object. It MUST be assigned0 -
Any solution to this problem? I have the same problem (when sending email with Office 11 automation)0
-
Hello Guys,
I found already existing, but i guess forgotten topic about this strange limitation for automations:
IF WithEvents property is set to true, then no assignment to variable can be done.
Problem: my variable has to be initiated from other one's function so assignment is necessary here...
But also for me this variable without events makes no sense at all... So maybe someone discovered workarounds how to
manage both things for that variable ? Automation is 'Microsoft Speech Object Library'.SpSharedRecognizer0 -
Hi, 2mas,
write your own comvisible class with implemented object 'Microsoft Speech Object Library'. Add “load” method to your class to put that object from outside. Catch the object’s events within the class and bypass them to Navision with your custom event. On Navision create automation with events, load variable and wait for events.
Good luck!0
Categories
- All Categories
- 73 General
- 73 Announcements
- 66.6K Microsoft Dynamics NAV
- 18.7K NAV Three Tier
- 38.4K NAV/Navision Classic Client
- 3.6K Navision Attain
- 2.4K Navision Financials
- 116 Navision DOS
- 851 Navision e-Commerce
- 1K NAV Tips & Tricks
- 772 NAV Dutch speaking only
- 617 NAV Courses, Exams & Certification
- 2K Microsoft Dynamics-Other
- 1.5K Dynamics AX
- 320 Dynamics CRM
- 111 Dynamics GP
- 10 Dynamics SL
- 1.5K Other
- 990 SQL General
- 383 SQL Performance
- 34 SQL Tips & Tricks
- 35 Design Patterns (General & Best Practices)
- 1 Architectural Patterns
- 10 Design Patterns
- 5 Implementation Patterns
- 53 3rd Party Products, Services & Events
- 1.6K General
- 1.1K General Chat
- 1.6K Website
- 83 Testing
- 1.2K Download section
- 23 How Tos section
- 252 Feedback
- 12 NAV TechDays 2013 Sessions
- 13 NAV TechDays 2012 Sessions