i want to create an appointment item in outook 2019 (365). After save this item has to be display.
After the display i need this item to work with it, but the instance ends after display.
I start a new outlook "session" to find the item with the EntryID but it end with an -155 error at the last line .... GETITEMFROMID.
Any Idea oder experience about this?
newinstance "OUTLOOK16_APPLICATION", hv_APPLICATION
newinstance "OUTLOOK16_APPLICATION", hv_APPLICATION
THX a lot
could it be you should explicitely use deleteinstance for your first instance before let's code going for the second newinstance?Or:you should use another handler to manage two instances in memory without hiccups?
I did not verified these suggestions ... 😉
Hello Gianni, i check this to delete the instanceses bue...
It dosn't resolve this issue...
Error -155 is related to newinstance and it is described as:
An error occurred while creating an instance:
The description is obviously related to a Uniface component instance but it is applicable with a "grain of salt" to any newinstance.
Few more thoughts:- are you sure you declared all variables in a proper way?- any feedback ($status or $result) in the code lines before the one giving error? All expected INOUT or OUT parameters are exiting without any hiccups?- could it be a timing problem? Try to add a deleteinstance then put a sleep instruction for at least 2-3 seconds before the 2nd new instance.- Is Outlook on that machine/node already correctly initialized? I mean: opening it interactively does not show any intermediate question screen?
this is the $procerrorcontext:
"ERROR=-155·;MNEM=<UACTERR_CREATE_INSTANCE>·;DESCRIPTION=Error creating instance·;COMPONENT=WEB1000D90·;PROCNAME=LP_TEST·;TRIGGER=DTLF·;LINE=15"
And this the Screenhot from debugging:
I have allready a status = 0 for all the other instances.
I think the issue is into the parameters for the GETITEMFROMID?Thanks
This is the signature:
I do not see any connection to a mailbox in your code...AFAIK it is mandatory.Is it somehow implicitly executed?
did you check the Signature?
When I import the Signatures with
/sti /mwr=com /pid Outlook.Application:outlook_
then I got many "?UNKNOWN?" Handles!!!
Also I can not found any Signatures for Class TaskItem nor Class AppointmentItem.
Maybe you have to program your own DLL or EXE with .NET?
i think this is the problem to work with this signature.
There is no Classifikation found!
I checked this too, and you are right!
This is the reason for this issue
Just to clarify how I am usually resolving these hiccups with signatures imported with /sti.
Uniface, being component based, is defining the output mapping for an object handler to ?UNKNOWN? when a single call could exit pointing to different objects structures; this latest behaviour is typical of object based programming. We need to resolve these ?UNKNOWN? definitions substituting each of them with a real object structure managed from the external program before being able to use that call into Uniface.
Let's use CreateItem() from Outlook as an example; depending from how it is called AFAIK it could exit with:- an __items() object structure- a _mailitem() object structure (usable for appointments, as we have just discovered together, working on Dirk issue)- a _contactitem() object structure
In these cases I fully duplicate the original operation loaded from /sti into those needed from my Uniface programs; in this case I will have:- a CreateItem() original method, with handle pointing to __Items() object structure- a UCreate_Mail, complete duplication of the original CreateItem(), but with handle pointing to _MailItem- a UCreate_Contact, complete duplication of the original CreateItem(), but with handle pointing to _ContactItem
The important parts are:1) to duplicate the operation in a complete way, including "Literal Name" of each parameter.2) I am also using a U in front of operation name to easily identify these custom operations.3) To properly document those customization into comment field of each new operation.
Hope it helps.
This work for me to resolve my issue in this case.
I follow your description and now my code is running how i want!
Thank you for thelot of work to invest to help me.
I am back to work now and I am checking your code to my repo.
I've used O16_ as a prefix while loading Outlook16 signatures into Uniface repo. So where you have OUTLOOK16_ in mine you will see O16_.
Let's go step by step. I am finding no issue while executing first two instructions:
newinstance "OUTLOOK16_APPLICATION", hv_APPLICATION
Now...I am getting -59 (operation does NOT exists) after executing SET_SUBJECT(). The SET_SUBJECT operation is requested into the object given back from previous istruction CREATE_ITEM(). My CREATE_ITEM() operation is giving back a O16__ITEMS object while your should be mapped to a different object; I've executed this query into my Uniface repo:
select uspecnam from usoper where uspecnam like 'O16_%' and uopernam = 'SET_SUBJECT'
it is giving back components which includes the SET_SUBJECT() operation/method; the result is:
To which of those objects is it mapped your CREATE_ITEM() operation/method?
My bet is for *_MAILITEM... 🙂 If yes, have you already used your signatures to build a sending mail functionality before?
hv_APPLICATION->CREATEITEM(hv_TASKITEM, 1)should create an AppointmentItem!!!But you will not find an O16_AppointmentItem nor an O16_TaskItem in Uniface.See also my Comment below.RegardsNorbert
OK, I've (temporarly) mapped object pointed from CREATEITEM() to O16__MAILITEM.
Now SET_SUBJECT() is correctly executed and the following one SAVE() too; but two things:
1) next instruction: GET_ENTRYID is giving back null while it should give back a string, probably a UUID()2) last instruction of first block is showing an email screen, symptom it was building an email, NOT an appointment.
I'll try to figure out how to build an appointment because I need it too.
I've (temporarly) modified object pointed from CREATE_ITEM() to O16__MAILITEM. Now first part of your code works up to SAVE() but after that things are not clear:
1) GET_ENTRYID(sv_ENTRYID) give back NULL while it should give back a string, probably an UUID().2) The following instruction DISPLAY("TRUE") let's an email screen be shown, which is sympthom Outlook was composing an email, NOT an appointment.
Now, VBA code to create an appointment is something like:
Sub CreateAppt() Dim myItem As Object Dim myRequiredAttendee, myOptionalAttendee, myResourceAttendee As Outlook.Recipient Set myItem = Application.CreateItem(olAppointmentItem) myItem.MeetingStatus = olMeeting myItem.Subject = "Strategy Meeting" myItem.Location = "Conf Rm All Stars" myItem.Start = #9/24/2009 1:30:00 PM# myItem.Duration = 90 Set myRequiredAttendee = myItem.Recipients.Add("Nate Sun") myRequiredAttendee.Type = olRequired Set myOptionalAttendee = myItem.Recipients.Add("Kevin Kennedy") myOptionalAttendee.Type = olOptional Set myResourceAttendee = myItem.Recipients.Add("Conf Rm All Stars") myResourceAttendee.Type = olResource myItem.Display myItem.Send End Sub
I'll try to build something similar which works because I need it too.
after die Post from Norbert i do the same and mapped the UNKNOWN classifikation to the OUTLOOK16_MAILITEM Signature like this:
I need the functions from the _MAILITEM Signature.
AND IT WORKS
This is now the rest of the programcode:
if (bv_RESOLVE == 1)
If we found the Entry-ID:
Create an Recipient, resolve him and move the appointmantitem to his folder.
THANKS to Gianni and Norbert for your help and the right ideas!
when I import the Signatures with
then I can not found any Signatures for Class TaskItem nor Class AppointmentItem
but when I import the Signatures with
/sti /mwr=com "C:\Program Files\Microsoft Office\root\Office16\MSOUTL.OLB"
then I will find them as TASKITEM and U_TASKITEM ...
So what is the Difference between the to Statements?
Why can't we use a prefix for the second Statement?
very nice findings... I am very interested in it!!!
I know you tried almost everything but asking must be done...have you tried:
"C:\Program Files\Microsoft Office\root\Office16\MSOUTL.OLB":moreoutlook_
i checked your post into my test-environment and now i can find also a appointment signature.
but we can't use it in this way!
I have the same questions you ask!
We need the secound statement with a prefix.
this is the test:
for now we don't use outlook.
But for Excel and Word I am doing the following:
In the evening I will do some Tests, to see what is Difference between the to Import-Methods.
I made search over internet and it seems something changed into Outlook starting from Outlook2013. When MS Office 2013 went out on the market people still using VB6 were complaining about some missing calls into official Outlook type library and someone from Microsoft pointed them to MSOUTL.OLB file, the one that Norbert pointed out. This hypothesis is also confirmed from signatures loaded loaded from MSOUTL.OLB with suffix _10 or _11 or _12 pointing to methods overcome in a new version in the Outlook evolution.
Based on this fact I've imported on my working machine into a temporary Uniface repo all Outlook signatures either coming from:- as described into Uniface documentation: /sti /mwr=com /pid Outlook.Application:OL19- as found from Norbert: /sti /mwr=com "C:\Program Files\Microsoft Office\root\Office16\MSOUTL.OLB"Each of those two groups were collected into a separate SubSystem (Sorry guys, still U9 here!):- MSOFFICE- OUTLOOK2019PLUS
I've made a quick comparison for few common signatures between the two groups; I've used these component signatures:- (prefix)application- (prefix)recipientThey are IDENTICAL, same operations and same parameters, with differences only into fields TIMESTAMP, COMPONENTNAME, SUBSYSTEM (obviously!).
At this point it seemed to me those loaded from MSOUTL.OLB were a superset of those coming from Outlook PID and again those coming from MSOUTL.OLB seeed more aligned to current Outlook functionalities.
To confirm the first impression I've built a spreadsheet extracting ALL signatures from both groups, normalizing signatures names and ordering them; this is confirming the signatures group from MSOUTL.OLB is a COMPLETE superset of the other group. The spredsheet could be downloaded from HERE. Rows marked with yellow color are related to signatures only available from MSOUTL.OLB.BTW: there are two cases where signatures names are different but it is a condition forced from 32char max length for signatures names into Uniface repo; literal name for both cases is larger and identical.
Hope this help everyone working with Outlook signatures in a Uniface program.
If anyone would like to share more informations on this subject, it would be more than welcome!
Some time ago I've created a little tool for COM (and C) signatures that can be found on Github:
In 2015 I even gave a presentation about the tool at the German user conference in Augsburg (https://www.u-b-g.org/tagung/201501/).
I also have a Uniface 10 version of the tool, but it's not yet on Github. I, however can share it if someone is interested.
And the difference between importing the COM signatures using /pid or a type library is as follows:
When /pid is used then Uniface:
When using the type library then Uniface:
The above mentioned tool allows you to check all parameters for the UNKNOWN handle classification and from the search result you can open the affected operations. From there you can easily change the classification.
Besides this the tool also allows you to add a prefix to all signatures or rename them in one go (or individually). You also can rename, copy, or move operations. In addition you also can navigate from one signature to another (by double clicking on the handle classification of a parameter). You can also filter the signatures, import, export, or compile them. There's probably more, but that's all I remember at the moment.
I hope this helps.
I am interested in the Uniface 10 version of the tool.
first of all: thanks for this GREAT tool!
1) Is there any difference between "renaming" and "adding a prefix" in both cases to a single signature?2) When adding a prefix to more signatures those with a version at the end (like _10) very often generate an error like "A prefix is already defined" but renaming the same signature it works! Could you explain a little bit more what's happening in these cases?3) I've collected SIGWIZ a long time ago (I do not rember exactly). I do not found a change log on github. Did you've change/maintained it somehow?
Apologies for not replying earlier. I could not find time before to do this.
I've found a problem with the tool specific to UF10 and I've tried to fix it. It now should work again as it does in version 9. Will provide the export in the coming days. Thanks for your understanding.
Gianni, I've also created a doc for the tool and it's available as PDF on github. It should explain all the different functions.
The behavior described in 2) is not correct and I've tried to correct this. It hopefully will work better with the updated version for UF10.
And there is no change log. I don't think that I've ever made any changes to the version I've uploaded to Github.
Hope this helps.
I've put the updated sources of the SigWiz tool for Uniface 10.3 here (for the time being):
The goal is to make this available on GitHub as well.
77 4th AvenueWaltham, MA 02451 USA
Rocket Support Community
All Support Offerings
About Rocket Software
Training and Services
Forum Terms and Conditions
Contact Forum Moderator