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.
Thread starter Similar threads Forum Replies Date
M VbScript for Command Button on Contacts Custom Form Using Outlook 1
M Forward Appointment as BCC with VBScript Outlook VBA and Custom Forms 7
D Security patch seems to kill vbscript on Enterprise Level Outlook VBA and Custom Forms 4
R VBScript Commands Outlook VBA and Custom Forms 2
Mark White VBScript Move sent mail to non-default folder Outlook VBA and Custom Forms 5
Mark White VBScript Move sent mail to non-default folder Outlook VBA and Custom Forms 0
JorgeDario Template oft that contains VBScript Is not running Using Outlook 1
J Outlook 2010 VBScript editor does not run code at all Outlook VBA and Custom Forms 0
T Create new item in public folder using VBscript Outlook VBA and Custom Forms 1
R VBScript Sendmail not selecting correct 'from' address Outlook VBA and Custom Forms 3
B Recommended Outlook & VBScript Books? Outlook VBA and Custom Forms 3
Mary B VBscript: Need to copy every email to a folder & mark that copy as read Outlook VBA and Custom Forms 5
K VBScript Outlook, add attachment Outlook VBA and Custom Forms 1
S VBA Macro to VBScript Outlook VBA and Custom Forms 1
E VBScript to replace module? Using Outlook 3
F VBScript to add pre defined text Using Outlook 5
D Custom form and VBScript Using Outlook 5
F VBScript copy contacts and remove duplicates Using Outlook 1
R VBA Macro to VBScript in a form- Help Please! Using Outlook 10
H Accessing a control on a frame in Outlook with VBScript Outlook VBA and Custom Forms 1
Y Creating a Task with VBScript Outlook VBA and Custom Forms 14
N VBScript does not run in Outlook 2003 Outlook VBA and Custom Forms 4
P Unread Until Click Another Message? Using Outlook 2
O On click,I want to change subject line of selected mail and then reply to particular email and move Using Outlook 3
Diane Poremsky Using Scanpst in Outlook Click to Run New Slipstick.com Articles 0
J Can Click to Drag Custom Form Field But Cannot Drop When Designing in Outlook 2007 Outlook VBA and Custom Forms 2
B Open a folder / subfolder of a PST in single click Outlook VBA and Custom Forms 4
C Reminder for single-click appointment Using Outlook 2
Diane Poremsky Contacts are missing when you click the To button New Slipstick.com Articles 0
M Office 365 Click to run BCM (Business Contact Manager) 0
williamlambton Reinstate "Open" button on mail item right-click context menu. Outlook Wishlist 2
B Auto name checking upon Tab or Click off To field(s) Using Outlook 19
F Jump to Inbox folder when click on Favorite Using Outlook 0
D Must now "View on Facebook" for Mentions/Comments-Outlook 2013 click-to-run Using Outlook 2
I BCM Opportunity: click on "new op" opens a "new tasks" BCM (Business Contact Manager) 0
M Automatically move Outlook message to the specific folder when click on reply to all Using Outlook 4
M Blank Pop-up Window when click "Manage Sharing" BCM (Business Contact Manager) 1
Emerogork How do I remove "Delete Folder" from the right-click menu? Using Outlook 1
R click to toggle quick click category reasigns to where ? Using Outlook 2
L Add to Right Click Menu Using Outlook 10
T Is the standalone Outlook 2013 click-to-run or msi? Using Outlook 1
A Uninstall Click and Run Exchange Server Administration 2
B Right click-drag no longer creates hyperlinks Using Outlook 2
A email folders appear empty, at first click Using Outlook 2
S How to add a new menu item to a right click context menu of a link Using Outlook 5
P "open" command in right click context menu Outlook Wishlist 4
L Outlook 2010 Instant Search Pops When I Click Using Outlook 6
M When I click “new message” in outlook, my cursor defaults to the body of the m Using Outlook 6
B right click outlook objects in OL2010 acts on current inbox mailitem Using Outlook 6
T Click "A" to see all email from people with names starting with A... etc Using Outlook 3
Similar threads


















































Top