Search found 39 matches

by sw
Wed Jul 22, 2020 4:05 pm
Forum: C++ Development
Topic: wxAutomationObject Outlook call method results in invalid object (wxVariant)
Replies: 7
Views: 126

Re: wxAutomationObject Outlook call method results in invalid object (wxVariant)

It displays the correct object types for me now too.

But earlier, I was missing the Logon call so maybe that messing with the objects somehow?

Or it is possible that I'm logging too many things and interpreted the wrong thing...
by sw
Wed Jul 22, 2020 1:02 pm
Forum: C++ Development
Topic: wxAutomationObject Outlook call method results in invalid object (wxVariant)
Replies: 7
Views: 126

Re: wxAutomationObject Outlook call method results in invalid object (wxVariant)

The code was correct all along #-o That being said, the LCID by default was 0x800 and I couldn't find any info about 0x800. Outlook is running in 0x409 (en-us) so I set my C++ code to do the same. My Outlook has two work emails. In VBA code, I was using the second one which tends to get more traffic...
by sw
Wed Jul 22, 2020 7:42 am
Forum: C++ Development
Topic: wxAutomationObject Outlook call method results in invalid object (wxVariant)
Replies: 7
Views: 126

Re: wxAutomationObject Outlook call method results in invalid object (wxVariant)

I went further up into my code and added some more logging and I see all object variants (which I expect to contain IDispatch) are getting logged like so variant type: "IDispatch - <Invalid object>", value: "00CCEA8C", name: "". variant type: "IDispatch - <Invalid object>", value: "00CCEB64", name: ...
by sw
Wed Jul 22, 2020 7:32 am
Forum: C++ Development
Topic: wxAutomationObject Outlook call method results in invalid object (wxVariant)
Replies: 7
Views: 126

Re: wxAutomationObject Outlook call method results in invalid object (wxVariant)

Retrieving the Count property returns Int.Max - 1 (2147483647). I get the same result in VBA too. Ok, let me try stepping into wxAutomationObject code and try to figure out what's happening in there... I think I'll use that as a last ditch attempt if I don't come right with wxAutomationObject. I'm k...
by sw
Tue Jul 21, 2020 9:36 pm
Forum: C++ Development
Topic: wxAutomationObject Outlook call method results in invalid object (wxVariant)
Replies: 7
Views: 126

wxAutomationObject Outlook call method results in invalid object (wxVariant)

I am writing this VBA code into wxAutomationObjects // omitted... strFilter = "[Start] <= '2020/07/21 23:59' AND [End] >= '2020/07/21 00:00'" Debug.Print strFilter Set olTodayCalendarItems = olCalendarItems.Restrict(strFilter) Set olItem = olTodayCalendarItems.GetFirst() Do While Not olItem Is Nothi...
by sw
Mon Jul 13, 2020 10:03 pm
Forum: C++ Development
Topic: Access array data in wxVariant from wxAutomationObject call
Replies: 4
Views: 123

Re: Access array data in wxVariant from wxAutomationObject call

Thank you for the detailed response! Yes, after reading a bit more through the Outlook VBA documentation I understand that a bit more. Yeah, your suggestion to use the official documentation and playing around in the Office built-in VBA IDE is useful and easier to get a working solution and then por...
by sw
Sun Jul 12, 2020 8:26 pm
Forum: C++ Development
Topic: Access array data in wxVariant from wxAutomationObject call
Replies: 4
Views: 123

Re: Access array data in wxVariant from wxAutomationObject call

I realize I used wxWidgets and Microsoft terminology interchangably and I'm still getting to grips with OLE. Apologies. Yes, we are talking about Folder.Items And I missed the fact that it is a Object property... So Items is actually a Folders object type correct? Because the Count property exists o...
by sw
Sun Jul 12, 2020 7:01 pm
Forum: C++ Development
Topic: Access array data in wxVariant from wxAutomationObject call
Replies: 4
Views: 123

Access array data in wxVariant from wxAutomationObject call

Yet again, another question about Interop with Outlook using wxAutomationObject. I am attempting to replicate this logic here https://github.com/notfarfromorion/All-In-One-Code-Framework/blob/cf711261c52d51d1c9e903d2395d7f200b392743/Visual%20Studio%202008/CppAutomateOutlook/Solution1.cpp#L124 to get...
by sw
Sat Jul 11, 2020 10:18 pm
Forum: C++ Development
Topic: Compose wxVariant for missing parameter in wxAutomationObject method call
Replies: 4
Views: 130

Re: Compose wxVariant for missing parameter in wxAutomationObject method call

Yes, that's the error I got when I tried to do that with Outlook. Unfortunately, I didn't think to grab the error and I moved on code-wise.

Gives the impression that Outlook isn't as maintained as Excel is in terms of features...
by sw
Sat Jul 11, 2020 5:01 pm
Forum: C++ Development
Topic: Compose wxVariant for missing parameter in wxAutomationObject method call
Replies: 4
Views: 130

Re: Compose wxVariant for missing parameter in wxAutomationObject method call

Thank you, PB

The named variant parameters did not work. OLE returns errors when invoked.

The wxVariantDataErrorCode worked for me.
by sw
Sat Jul 11, 2020 11:02 am
Forum: C++ Development
Topic: Compose wxVariant for missing parameter in wxAutomationObject method call
Replies: 4
Views: 130

Compose wxVariant for missing parameter in wxAutomationObject method call

How can I make the wxVariant object in wxWidgets handle a missing parameter in wxAutomationObject CallMethod as per the docs here https://docs.microsoft.com/en-us/sql/ado/guide/appendixes/visual-c-ado-programming?view=sql-server-ver15 "If you want to specify a missing parameter whose data type is a ...
by sw
Thu Jul 09, 2020 9:42 am
Forum: C++ Development
Topic: wxDataViewCtrl slow to update model node labels on data change
Replies: 2
Views: 85

Re: wxDataViewCtrl slow to update model node labels on data change

Thanks doublemax.

Refresh() did the trick. Thank you
by sw
Wed Jul 08, 2020 10:10 pm
Forum: C++ Development
Topic: wxDataViewCtrl slow to update model node labels on data change
Replies: 2
Views: 85

wxDataViewCtrl slow to update model node labels on data change

I have a wxDataViewCtrl using the tree node view. I have a root node with special nodes as children and these have their respective data. The special nodes can change their data on a date range and this causes the special nodes labels to get updated as well (and the root node label too). Changing th...
by sw
Mon Jul 06, 2020 4:47 pm
Forum: C++ Development
Topic: Correctly clear many nodes of a parent node in wxDataViewModel
Replies: 2
Views: 95

Re: Correctly clear many nodes of a parent node in wxDataViewModel

My logic to delete nodes was correct all this time. It was my date logic that was wrong all this time (it was never updating the date hence it was looking like data was not changing). I just didn't see it until I started debugging much earlier in my method.

<sigh>
by sw
Sun Jul 05, 2020 6:14 pm
Forum: C++ Development
Topic: Correctly clear many nodes of a parent node in wxDataViewModel
Replies: 2
Views: 95

Correctly clear many nodes of a parent node in wxDataViewModel

How do I correctly remove multiple items in a wxDataViewCtrl when using a wxDataViewModel derived model? I have a root node with a couple of special nodes with the root as it's parent. The special nodes have a couple of items in them which can be completely cleared when switching between dates. This...