{"id":848,"date":"2012-10-10T11:53:24","date_gmt":"2012-10-10T09:53:24","guid":{"rendered":"http:\/\/www.blue-bears.com\/blog\/?p=848"},"modified":"2012-12-12T11:47:50","modified_gmt":"2012-12-12T10:47:50","slug":"macro-vba-pour-exporter-les-contacts-outlook-sous-roundcube","status":"publish","type":"post","link":"http:\/\/www.blue-bears.com\/blog\/?p=848","title":{"rendered":"Macro VBA pour exporter les contacts Outlook sous Roundcube"},"content":{"rendered":"<p>&lsquo;Ouvrir carnet adresses Outlook<br \/>\n&lsquo;selectionner qq adresses<\/p>\n<p>&lsquo;Exporte les contacts Outlook selectionn\u00e9s sous forme de Vcard individuelles<\/p>\n<p><!--more--><br \/>\nConst mypath As String = \u00ab\u00a0C:\\Data\\Vcards\\\u00a0\u00bb<br \/>\nSub save_contacts()<br \/>\nDim mycontact As Outlook.ContactItem<br \/>\nFor Each mycontact In Outlook.ActiveExplorer.Selection<br \/>\nmycontact.SaveAs mypath &amp; mycontact &amp; \u00ab\u00a0.vcf\u00a0\u00bb, Type:=olVCard<br \/>\nNext mycontact<br \/>\nEnd Sub<\/p>\n<p>&lsquo;Fusionne toutes les Vcards pr\u00e9sentes dans le r\u00e9pertoire en un fichier texte importable sous RoundCube<br \/>\nSub save_contacts_all()<br \/>\nDim strOutputDirectory, strOutputFilePrefix, strOutputFileSuffix As String<br \/>\nstrTypeCommand = \u00ab\u00a0c:\\windows\\system32\\cmd.exe \/c\u00a0\u00bb<br \/>\nstrOutputDirectory = mypath<\/p>\n<p>strOutputFileSuffix = \u00ab\u00a0.vcf\u00a0\u00bb<br \/>\nstrOutputFileName = \u00ab\u00a0allContacts.txt\u00a0\u00bb<\/p>\n<p>Dim strCommand As String<\/p>\n<p>strCommand = strTypeCommand &amp; \u00a0\u00bb \u00ab\u00a0\u00a0\u00bbcopy \u00a0\u00bb &amp; strOutputDirectory &amp; \u00ab\u00a0*\u00a0\u00bb &amp; strOutputFileSuffix &amp; \u00a0\u00bb \u00a0\u00bb &amp; strOutputDirectory &amp; strOutputFileName &amp; \u00ab\u00a0\u00a0\u00bb\u00a0\u00bb\u00a0\u00bb<br \/>\n&lsquo;Debug.Print strCommand<br \/>\nCall Shell(strCommand, 3)<\/p>\n<p>End Sub<\/p>\n","protected":false},"excerpt":{"rendered":"<p>&lsquo;Ouvrir carnet adresses Outlook &lsquo;selectionner qq adresses &lsquo;Exporte les contacts Outlook selectionn\u00e9s sous forme de Vcard individuelles<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[17],"tags":[],"class_list":["post-848","post","type-post","status-publish","format-standard","hentry","category-informatique"],"_links":{"self":[{"href":"http:\/\/www.blue-bears.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/848","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/www.blue-bears.com\/blog\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.blue-bears.com\/blog\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.blue-bears.com\/blog\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.blue-bears.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=848"}],"version-history":[{"count":2,"href":"http:\/\/www.blue-bears.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/848\/revisions"}],"predecessor-version":[{"id":986,"href":"http:\/\/www.blue-bears.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/848\/revisions\/986"}],"wp:attachment":[{"href":"http:\/\/www.blue-bears.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=848"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.blue-bears.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=848"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.blue-bears.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=848"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}