Error Runtime Appointment Outlook
Contents |
for Help Receive Real-Time Help Create a Freelance Project Hire for a Full Time Job Ways to Get Help Ask a Question Ask for Help Receive Real-Time Help Create a Freelance Project
Outlook Express Runtime Error
Hire for a Full Time Job Ways to Get Help Expand Search Submit microsoft outlook runtime error Close Search Login Join Today Products BackProducts Gigs Live Careers Vendor Services Groups Website Testing Store Headlines Experts outlook 2007 runtime error Exchange > Questions > Outlook Appointment UserProperties runtime error "InvalidCastException" Want to Advertise Here? Solved Outlook Appointment UserProperties runtime error "InvalidCastException" Posted on 2014-03-05 Outlook MS Development-Other Visual Basic.NET 1 Verified
Outlook 2000 Runtime Error
Solution 6 Comments 465 Views Last Modified: 2014-03-12 Hi all, I have an annoying problem, in that some code that has been working really well has stopped working in the last few weeks, and I can't seem to fix it. It still compiles OK, but fails at runtime with an "InvalidCastException" error. It is a desktop application, and essentially we have a database
Outlook Runtime Error 91
that holds details of the jobs we do, and also the work that we do for each job. Work is defined as a period of time where we do something towards completing a job. The code reads through Work entries in the database and also all of the user's Outlook appointments looking for matches. When it finds a match, it updates the Outlook appointment. If it does not find a match it creates a new appointment in Outlook. The match is found by using a UserProperties field called "WID" which holds the Work ID number from the SQL database. What I am finding now is that existing Outlook appointments can be updated just fine, but we get the "InvalidCastExcpetion" error when the code tries to create the UserProperty for a new appointment. As I said, it compiles OK, but fails at runtime. The code is below - the runtime error occurs at the line 23, and it has been running absolutely fine with Office 2013 and 2010. SRow is declared elsewhere as a DataRow, and holds data from the Work table. If Not
360 games PC games custom ui runtime error in outlook Windows games Windows phone games Entertainment All Entertainment
Windows Mail Runtime Error
Movies & TV Music Business & Education Business Students & educators event 1026 .net runtime error Developers Sale Sale Find a store Gift cards Products Software & services Windows Office Free downloads & security Internet https://www.experts-exchange.com/questions/28381198/Outlook-Appointment-UserProperties-runtime-error-InvalidCastException.html Explorer Microsoft Edge Skype OneNote OneDrive Microsoft Health MSN Bing Microsoft Groove Microsoft Movies & TV Devices & Xbox All Microsoft devices Microsoft Surface All Windows PCs & tablets PC accessories Xbox & games Microsoft Lumia All https://support.microsoft.com/en-us/kb/2423906 Windows phones Microsoft HoloLens For business Cloud Platform Microsoft Azure Microsoft Dynamics Windows for business Office for business Skype for business Surface for business Enterprise solutions Small business solutions Find a solutions provider Volume Licensing For developers & IT pros Develop Windows apps Microsoft Azure MSDN TechNet Visual Studio For students & educators Office for students OneNote in classroom Shop PCs & tablets perfect for students Microsoft in Education Support Sign in Cart Cart Javascript is disabled Please enable javascript and refresh the page Cookies are disabled Please enable cookies and refresh the page CV: {{ getCv() }} English (United States) Terms of use Privacy & cookies Trademarks © 2016 Microsoft
SQL Server 2014 Express resources Windows Server 2012 resources Programs MSDN subscriptions Overview Benefits Administrators Students Microsoft Imagine Microsoft Student Partners ISV Startups TechRewards Events Community Magazine Forums Blogs Channel 9 Documentation APIs and reference Dev centers Retired content Samples https://social.msdn.microsoft.com/Forums/en-US/487f1954-5135-4039-a98a-9e92bb850102/runtime-error-91-with-outlook-appointmentitem?forum=isvvba We’re sorry. The content you requested has been removed. You’ll be auto redirected https://community.dynamics.com/crm/f/117/t/81942 in 1 second. Ask a question Quick access Forums home Browse forums users FAQ Search related threads Remove From My Forums Asked by: Run-time error '91' with Outlook AppointmentItem Microsoft ISV Community Center > Visual Basic for Applications (VBA) Question 0 Sign in to vote I keep getting Run-time error '91': Object variable or runtime error With block variable not set when I run the following code. The code stops at the line in bold: If oAppt.UserProperties("Billing Information").Value <> "" Then. The really strange thing is, if I step through the code using F8, the error does not occur; it only happens when I try to run the code to the end. Any ideas about what's wrong? Sub TestTable() Dim oRow As Outlook.Row outlook runtime error Dim oTable As Outlook.Table Dim oFolder As Outlook.Folder Dim Filter As String Dim oAppt As Outlook.AppointmentItem Set oFolder = Application.Session.GetDefaultFolder(olFolderCalendar) Filter = "[Start] > '07/07/2010'" Set oTable = oFolder.GetTable(Filter) Do Until (oTable.EndOfTable) Set oRow = oTable.GetNextRow() Set oAppt = Application.Session.GetItemFromID(oRow("EntryID")) If oAppt.UserProperties("Billing Information").Value <> "" Then Debug.Print (oAppt.Subject) Debug.Print (oAppt.UserProperties("Company")) End If Loop End Sub Wednesday, July 14, 2010 5:41 AM Reply | Quote All replies 0 Sign in to vote BillingInformation is a standard property, not a custom property. Use either of oAppt.ItemProperties("BillingInformation") or simply oAppt.BillingInformation. You could also make the code much more efficient by adding the properties to the table rather than retrieving an individual item. One other point: What are you actually trying to accomplish with this code? The Table object is highly efficient, but it has one major drawback when it comes to calendar folders -- it exposes only the master appointment for a recurring series. The individual recurrences are not included. The only way to access them is by using IncludeRecurrences and the Items.Restrict method. Wednesday, July 14, 2010 12:44 PM Reply | Quote 0 Sign in to vote Thanks for your answer. Unfortunately, when I changed the line to oAppt.BillingInformation, I get a
365 for Enterprise Skype for business Microsoft Dynamics Microsoft Dynamics Sales Service Marketing Social Enterprise Resource Planning Small and Midsize Business Windows Windows 10 for business Windows 10 for Internet of Things Windows devices Data and analytics Data management and analytics Microsoft SQL Server Microsoft Power BI Microsoft Cortana Intelligence Suite Operations management Operations Management Suite System Center Sign in Search Microsoft Search Dynamics Community Participate Ask a Question Get Started Badges Earn Badges View Badges Leaderboards Compete on Leaderboards View Leaderboards Become an Expert Recommend a Blog Introduce Yourself Provide Feedback Communities Microsoft Dynamics AX Microsoft Dynamics CRM Dynamics 365, Business Edition Dynamics 365, Enterprise Edition Microsoft Dynamics GP Microsoft Dynamics NAV Partner Community Other Products Dynamics Community Microsoft Dynamics CRM Forums Microsoft Dynamics CRM Microsoft Dynamics Marketing Microsoft Social Engagement Parature, from Microsoft Blogs Videos Experts Support Dynamics Community Participate Ask a Question Get Started Badges Earn Badges View Badges Leaderboards Compete on Leaderboards View Leaderboards Become an Expert Recommend a Blog Introduce Yourself Provide Feedback Communities Microsoft Dynamics AX Microsoft Dynamics CRM Dynamics 365, Business Edition Dynamics 365, Enterprise Edition Microsoft Dynamics GP Microsoft Dynamics NAV Partner Community Other Products Microsoft Dynamics CRM Forums Microsoft Dynamics CRM Microsoft Dynamics Marketing Microsoft Social Engagement Parature, from Microsoft Blogs Videos Experts Support Appointment sync error: An unknown error occurred while synchronizing data to Outlook; resource not found Sign In Share Twitter LinkedIn Facebook Email Print RSS Allan2011 My Badges Question Status Verified Allan2011 asked a question on 13 Jun 2012 12:19 PM When manually syncing Appointments down from the CRM server to Outlook, it shows sync error "An unknown error has occurred...". In troubleshooting, this appears to be related to Appointment parties (i.e. the Required, Optional, and Organizer field parties). Trace file details: >crm id :'{17DDxxxx-DD92-xxxx-90DE-001EC932xxxx}', Error:An unknown error occurred while synchronizing data to Outlook.[2012-06-13 08:25:09.921] Process:OUTLOOK |Organization:e20fxxxx-cc79-xxx1-xxxx-001ec93xxxx4 |Thread: 25 |Category: Application.Outlook |User