{"id":42,"date":"2007-06-01T14:31:03","date_gmt":"2007-06-01T14:31:03","guid":{"rendered":"http:\/\/www.myfatblog.co.uk\/?p=42"},"modified":"2007-06-01T14:32:46","modified_gmt":"2007-06-01T14:32:46","slug":"excel-custom-properties-refresh-an-untidy-solution","status":"publish","type":"post","link":"http:\/\/www.myfatblog.co.uk\/index.php\/2007\/06\/excel-custom-properties-refresh-an-untidy-solution\/","title":{"rendered":"Excel Custom Properties Refresh &#8211; an untidy solution.."},"content":{"rendered":"<p>Well I&#8217;ve had some time to spend on this little conundrum and think I&#8217;ve found a solution. It&#8217;s not the tidiest and I&#8217;d welcome any suggestions of other methods to do this.<\/p>\n<p>Basically the problem is that the SharePoint web based dialogue appears before the Custom Properties are re-freshed in Excel 2003. There doesn&#8217;t appear to be any method available to re-fresh the properties. These properties only refresh AFTER the file has been through the pre-save (of which the SharePoint form is part) and just before the actual save.<\/p>\n<p>So, how do we force a refresh, well my solution is to utilise the temporary folder within windows and to save a quick copy of the file there, prior to pushing it to SharePoint. This has the added benefit of NOT showing the custom properties web form which suits my application just fine.<\/p>\n<p>First thing required is a reference to the Microsoft Scripting Runtime, This gives you access to the FileSystemObject from your code.<\/p>\n<p><code>Public fso as New FileSystemObject<\/code><\/p>\n<p>Then, where ever you want to place your save code (Mine is off a command button on a seperate control panel with the normal menu&#8217;s all hidden), the following code will retrieve the temporary fold and generate a random filename prior to the SharePoint save command.<\/p>\n<p><code>Dim f As Folder<br \/>\nDim fi As String<br \/>\nSet f = fso.GetSpecialFolder(TemporaryFolder)<br \/>\nfi = fso.GetTempName()<br \/>\nThisWorkbook.SaveAs f & \"\\\" & fi<br \/>\nThisWorkbook.SaveAs \"http:\/\/dev-esserviceorders\/Meta%20Data%20Test\/test2.xls\"<\/code><\/p>\n<p>As I said, It&#8217;s not the tidiest solution, but it works for now albeit adding a fair save time. But it does need some error checking adding as well.<\/p>\n<p>In the meantime, I&#8217;m going to keep looking for a better way of refreshing those custom properties..<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Well I&#8217;ve had some time to spend on this little conundrum and think I&#8217;ve found a solution. It&#8217;s not the tidiest and I&#8217;d welcome any suggestions of other methods to do this. Basically the problem is that the SharePoint web based dialogue appears before the Custom Properties are re-freshed in Excel 2003. There doesn&#8217;t appear &hellip; <\/p>\n<p><a class=\"more-link btn\" href=\"http:\/\/www.myfatblog.co.uk\/index.php\/2007\/06\/excel-custom-properties-refresh-an-untidy-solution\/\">Continue reading<\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_exactmetrics_skip_tracking":false,"_exactmetrics_sitenote_active":false,"_exactmetrics_sitenote_note":"","_exactmetrics_sitenote_category":0,"footnotes":""},"categories":[9,13,16],"tags":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v22.3 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Excel Custom Properties Refresh - an untidy solution.. - Blog of an overweight SharePoint addict<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"http:\/\/www.myfatblog.co.uk\/index.php\/2007\/06\/excel-custom-properties-refresh-an-untidy-solution\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Excel Custom Properties Refresh - an untidy solution.. - Blog of an overweight SharePoint addict\" \/>\n<meta property=\"og:description\" content=\"Well I&#8217;ve had some time to spend on this little conundrum and think I&#8217;ve found a solution. It&#8217;s not the tidiest and I&#8217;d welcome any suggestions of other methods to do this. Basically the problem is that the SharePoint web based dialogue appears before the Custom Properties are re-freshed in Excel 2003. There doesn&#8217;t appear &hellip; Continue reading\" \/>\n<meta property=\"og:url\" content=\"http:\/\/www.myfatblog.co.uk\/index.php\/2007\/06\/excel-custom-properties-refresh-an-untidy-solution\/\" \/>\n<meta property=\"og:site_name\" content=\"Blog of an overweight SharePoint addict\" \/>\n<meta property=\"article:published_time\" content=\"2007-06-01T14:31:03+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2007-06-01T14:32:46+00:00\" \/>\n<meta name=\"author\" content=\"Cimares\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@cimares\" \/>\n<meta name=\"twitter:site\" content=\"@cimares\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Cimares\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"1 minute\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"http:\/\/www.myfatblog.co.uk\/index.php\/2007\/06\/excel-custom-properties-refresh-an-untidy-solution\/\",\"url\":\"http:\/\/www.myfatblog.co.uk\/index.php\/2007\/06\/excel-custom-properties-refresh-an-untidy-solution\/\",\"name\":\"Excel Custom Properties Refresh - an untidy solution.. - Blog of an overweight SharePoint addict\",\"isPartOf\":{\"@id\":\"http:\/\/www.myfatblog.co.uk\/#website\"},\"datePublished\":\"2007-06-01T14:31:03+00:00\",\"dateModified\":\"2007-06-01T14:32:46+00:00\",\"author\":{\"@id\":\"http:\/\/www.myfatblog.co.uk\/#\/schema\/person\/55ae8f6885bb5b8390dad001f3da83c6\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"http:\/\/www.myfatblog.co.uk\/index.php\/2007\/06\/excel-custom-properties-refresh-an-untidy-solution\/\"]}]},{\"@type\":\"WebSite\",\"@id\":\"http:\/\/www.myfatblog.co.uk\/#website\",\"url\":\"http:\/\/www.myfatblog.co.uk\/\",\"name\":\"Blog of an overweight SharePoint addict\",\"description\":\"The rantings of a (not so) food obsessed IT consultant!\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"http:\/\/www.myfatblog.co.uk\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"http:\/\/www.myfatblog.co.uk\/#\/schema\/person\/55ae8f6885bb5b8390dad001f3da83c6\",\"name\":\"Cimares\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"http:\/\/www.myfatblog.co.uk\/#\/schema\/person\/image\/\",\"url\":\"http:\/\/www.myfatblog.co.uk\/images\/BlogImages\/About_D057\/TopOfTheWorld.jpg\",\"contentUrl\":\"http:\/\/www.myfatblog.co.uk\/images\/BlogImages\/About_D057\/TopOfTheWorld.jpg\",\"caption\":\"Cimares\"},\"sameAs\":[\"http:\/\/www.myfatblog.co.uk\"],\"url\":\"http:\/\/www.myfatblog.co.uk\/index.php\/author\/reginald\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Excel Custom Properties Refresh - an untidy solution.. - Blog of an overweight SharePoint addict","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"http:\/\/www.myfatblog.co.uk\/index.php\/2007\/06\/excel-custom-properties-refresh-an-untidy-solution\/","og_locale":"en_US","og_type":"article","og_title":"Excel Custom Properties Refresh - an untidy solution.. - Blog of an overweight SharePoint addict","og_description":"Well I&#8217;ve had some time to spend on this little conundrum and think I&#8217;ve found a solution. It&#8217;s not the tidiest and I&#8217;d welcome any suggestions of other methods to do this. Basically the problem is that the SharePoint web based dialogue appears before the Custom Properties are re-freshed in Excel 2003. There doesn&#8217;t appear &hellip; Continue reading","og_url":"http:\/\/www.myfatblog.co.uk\/index.php\/2007\/06\/excel-custom-properties-refresh-an-untidy-solution\/","og_site_name":"Blog of an overweight SharePoint addict","article_published_time":"2007-06-01T14:31:03+00:00","article_modified_time":"2007-06-01T14:32:46+00:00","author":"Cimares","twitter_card":"summary_large_image","twitter_creator":"@cimares","twitter_site":"@cimares","twitter_misc":{"Written by":"Cimares","Est. reading time":"1 minute"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"http:\/\/www.myfatblog.co.uk\/index.php\/2007\/06\/excel-custom-properties-refresh-an-untidy-solution\/","url":"http:\/\/www.myfatblog.co.uk\/index.php\/2007\/06\/excel-custom-properties-refresh-an-untidy-solution\/","name":"Excel Custom Properties Refresh - an untidy solution.. - Blog of an overweight SharePoint addict","isPartOf":{"@id":"http:\/\/www.myfatblog.co.uk\/#website"},"datePublished":"2007-06-01T14:31:03+00:00","dateModified":"2007-06-01T14:32:46+00:00","author":{"@id":"http:\/\/www.myfatblog.co.uk\/#\/schema\/person\/55ae8f6885bb5b8390dad001f3da83c6"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["http:\/\/www.myfatblog.co.uk\/index.php\/2007\/06\/excel-custom-properties-refresh-an-untidy-solution\/"]}]},{"@type":"WebSite","@id":"http:\/\/www.myfatblog.co.uk\/#website","url":"http:\/\/www.myfatblog.co.uk\/","name":"Blog of an overweight SharePoint addict","description":"The rantings of a (not so) food obsessed IT consultant!","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"http:\/\/www.myfatblog.co.uk\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"en-US"},{"@type":"Person","@id":"http:\/\/www.myfatblog.co.uk\/#\/schema\/person\/55ae8f6885bb5b8390dad001f3da83c6","name":"Cimares","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"http:\/\/www.myfatblog.co.uk\/#\/schema\/person\/image\/","url":"http:\/\/www.myfatblog.co.uk\/images\/BlogImages\/About_D057\/TopOfTheWorld.jpg","contentUrl":"http:\/\/www.myfatblog.co.uk\/images\/BlogImages\/About_D057\/TopOfTheWorld.jpg","caption":"Cimares"},"sameAs":["http:\/\/www.myfatblog.co.uk"],"url":"http:\/\/www.myfatblog.co.uk\/index.php\/author\/reginald\/"}]}},"_links":{"self":[{"href":"http:\/\/www.myfatblog.co.uk\/index.php\/wp-json\/wp\/v2\/posts\/42"}],"collection":[{"href":"http:\/\/www.myfatblog.co.uk\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.myfatblog.co.uk\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.myfatblog.co.uk\/index.php\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"http:\/\/www.myfatblog.co.uk\/index.php\/wp-json\/wp\/v2\/comments?post=42"}],"version-history":[{"count":0,"href":"http:\/\/www.myfatblog.co.uk\/index.php\/wp-json\/wp\/v2\/posts\/42\/revisions"}],"wp:attachment":[{"href":"http:\/\/www.myfatblog.co.uk\/index.php\/wp-json\/wp\/v2\/media?parent=42"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.myfatblog.co.uk\/index.php\/wp-json\/wp\/v2\/categories?post=42"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.myfatblog.co.uk\/index.php\/wp-json\/wp\/v2\/tags?post=42"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}