my vbscript button1_click code works on appointment created but not on opening an existing apntmn

Status
Not open for further replies.

savvaskef

New Member
Outlook version
Outlook 2010 32 bit
Email Account
hi I have an open_item sub and a commandbutton1_click sub.
the open_item loads data from a db and into a listbox.possiblevalues while the selected value is stored on a custom field
the commandbutton1_click creates a access.application object.(is it possible to do so in a modal way?)
When I create the appointment with the custom form everything works fine but when I open an existing appointment nothing works.It's ok for the listbox not to change items because they represent a stored value but I reallly need the button1_click to work...in both new and existing appointments
Any Ideas?
 

savvaskef

New Member
Outlook version
Outlook 2010 32 bit
Email Account
small detail:if I design this form and pushing execute form withjout anything else the button works
 

savvaskef

New Member
Outlook version
Outlook 2010 32 bit
Email Account
a vsto addin when opened for the first time publishes the form and associates it with a calendar.the message class is there ... changed to the nickname I gave it : esoda which stands for revenue and the form is there in place of 'P.2.'
 

savvaskef

New Member
Outlook version
Outlook 2010 32 bit
Email Account
however when I check the "all the fields" tab I can see the fields used in the form when I select esoda for display...when I select appointment fields the message class is 'IPM.appointment'. does it have anything to do with that?
 

Diane Poremsky

Senior Member
Outlook version
Outlook 2016 32 bit
Email Account
Office 365 Exchange
What is the form's full message class? It should be something like ipm.appointment.esoda. Oh, are you using code behind the form? There is an option in trust center to run scripts in folder and you'll also need security set to low so the macro runs.
 

savvaskef

New Member
Outlook version
Outlook 2010 32 bit
Email Account
Well, The form appears both on calendar properties(IPM.Appointment.Nickname) and inside an appointment (P.2.).

When creating an appointment the code runs,controls show,custom fields store value...
When opening an existing form controls work values are stored but the code does not run...not a single line of the item_open function or the commandbutton1_click.(these are the only pieces of vbscript code there)
 

savvaskef

New Member
Outlook version
Outlook 2010 32 bit
Email Account
What is the form's full message class? It should be something like ipm.appointment.esoda. Oh, are you using code behind the form? There is an option in trust center to run scripts in folder and you'll also need security set to low so the macro runs.
pleas guide me to the proper security settings. if there are more to it
all Macros are activated without prompt
applying security settings to addins is checked
what else?
 

Diane Poremsky

Senior Member
Outlook version
Outlook 2016 32 bit
Email Account
Office 365 Exchange
what folder is the saved appointment in? trust center > email security has a setting for scripts, but it only applies to shared and public folders.
script.png

oh... if using custom fields, are they set to calculate on new form or automatically? i had issues where fields didn't update correctly
 

savvaskef

New Member
Outlook version
Outlook 2010 32 bit
Email Account
I do not understand how email settings interact with my class of itmes which is .appointment and they are associated to custom calendars. I don't know how to make them shared but for now they don't seem to execute the vbs even when the checkboxes are checked.
I do not have calculated fields, only fields with possiblevalues popularized at Function Item_Open()...thus they are all calculated on new form...
But why,WHY,why does the vbscript does not execute...
 

Diane Poremsky

Senior Member
Outlook version
Outlook 2016 32 bit
Email Account
Office 365 Exchange
that setting in trust center applies to all outlook forms, not just email, that has script behind it. But if the folders are in your own mailbox and not shared by another exchange user, then its not the problem.
 

savvaskef

New Member
Outlook version
Outlook 2010 32 bit
Email Account
*sigh* I found out that the problem is computer-specific...in other installations it works...sorry for your time...you may erase this thread
 

savvaskef

New Member
Outlook version
Outlook 2010 32 bit
Email Account
on second thought :do you have any suggestions now (on how to fix it for any installation)
 

savvaskef

New Member
Outlook version
Outlook 2010 32 bit
Email Account
not realy, I just think that ms-office 2010 is 32-bit on both computers while the OS is 32-bit where it works and 64-bit where it doesn't.Still it's strange:it only runs once
 

Diane Poremsky

Senior Member
Outlook version
Outlook 2016 32 bit
Email Account
Office 365 Exchange
64bit OS won't matter, but 64bit Office could affect it, depending on the code you're using.
 

Diane Poremsky

Senior Member
Outlook version
Outlook 2016 32 bit
Email Account
Office 365 Exchange
Post the code you are using (or the form - zip it or change the extension to .txt
 
Status
Not open for further replies.
Top