avic_weo Posted August 16, 2009 Author Report Share Posted August 16, 2009 cool, way to go, Boby! Quote Link to post Share on other sites
Scotto Posted August 19, 2009 Report Share Posted August 19, 2009 This macro is outstanding. I have 2000+ contacts in Outlook/on my WM phone, and was just thinking "I wish there was a simple way of getting a few select contacts directly from Outlook to the AVIC." This thing worked perfectly. I used the FeloniusMonkey version. By the way, the necessary sqlite3.exe file can be found here: http://sqlite.org/download.html Quote Link to post Share on other sites
magna Posted August 20, 2009 Report Share Posted August 20, 2009 Awesome job.. Thanks.. I noticed some points.. 1) non-English characters are not displayed correctly on the AVIC. I added a replace function for these characters 2) Mobile and Business phones were mixed on the AVIC. I changed them too.. I attached the file export-phonebook.cls.txt Quote Link to post Share on other sites
avic_weo Posted August 20, 2009 Author Report Share Posted August 20, 2009 Hi Magna, the character conversion is nice, but there might be a problem with the following lines: Call PrintSQLElement(myItem.FullName, myItem.HomeTelephoneNumber, numQual * 1) Call PrintSQLElement(myItem.FullName, myItem.MobileTelephoneNumber, numQual * 3) Call PrintSQLElement(myItem.FullName, myItem.BusinessTelephoneNumber, numQual * 2) Call PrintSQLElement(myItem.FullName, myItem.OtherTelephoneNumber, numQual * 0) The AVIC only supports 3 dwTypes: 1, 2 and 3. Type 0 is used for no type. What I do with numQual is determine whether there is more than 1 phone number for a given contact. If there is, I use types 1, 2 and 3. If there isn't, type 0 is used. So adding a line with numQual *0 is dangerous in the sense that a contact appears with both his BusinessTelephoneNumber and his OtherTelephoneNumber, which is not what you want. So you either have to take out the numQual altogether, or you will have to take out the last line. Also, having numbers mixed up was a bug I thought I had corrected. Were you still working on an older version? Weo Quote Link to post Share on other sites
Scotto Posted August 20, 2009 Report Share Posted August 20, 2009 Weo, I have the number mix up with the FeloniusMonkey version. I compared the code, and it looks like he used your revised version (Jul 22). Here is what happens: What doesn't work: (outlook contact=>avic contact) Home+Mobile=>Home+Office What works: Home=>no label Office=>no label Mobile=>no label Home+Office+Mobile=>Home+Office+Mobile Office+Mobile=>Office+Mobile I didn't test Home+Office on edit: looks like the identifier for office and mobile is mixed up still. Quote Link to post Share on other sites
avic_weo Posted August 21, 2009 Author Report Share Posted August 21, 2009 This is where I got the info from: For those who are interested, the dwType column controls multiple numbers for each contact. Specifically:0 = General (only use this if you only have one number for that particular contact) 1 = Home 2 = Work 3 = Mobile I will make sure the original file works that way. (Might be I am a little lysdectic???) I did try out all combo's, and did not have any problem with them, but I do not really understand what you mean by What doesn't work:(outlook contact=>avic contact) Home+Mobile=>Home+Office Home+Mobile should result in Home+Mobile (that's what it does on my computer anyway ) Weo Quote Link to post Share on other sites
osubeaver Posted August 26, 2009 Report Share Posted August 26, 2009 I am having trouble making this work and I hope you can help. I have changed the file names to the following: Const SQDB As String = "c:\temp\PhoneBookxxxxxxxxx.db" Const SQLfile As String = "c:\temp\contacts.sql" Const SQLITE As String = "c:\temp\sqlite3.exe" The first file name is actually the file my nav unit created so I think I am OK there. The other file names I changed to c:/temp/*.* because I don't have a D drive. I can get through loading the text into the macro editor and running the macro. I get two choices and select "ThisOutlookSession.ContactsToSQDB" and run it. Thae macro asks permission to overwrite C:\temp\contacts.sql if it exists and I select yes. The macro asks what folder and I select Contacts. The macro asks "OK to generate PhonebookDB" and I select yes. At this point it has created the contacts.sql in C:\temp. Otherwise, the folder is empty. Then I get the error "File Not Found" and it returns me to the editor. Where am I screwed up? Quote Link to post Share on other sites
Boby Posted August 26, 2009 Report Share Posted August 26, 2009 So, your third line in the macro looks like this: Const SQLITE As String = "C:\temp\sqlite3.exe" Question: Have you downloaded the SQLite programm from here (http://www.sqlite.org/sqlite-3_6_17.zip), unzipped & stored the file "sqlite3.exe" in the folder C:\temp ? Quote Link to post Share on other sites
osubeaver Posted August 26, 2009 Report Share Posted August 26, 2009 Excellent! That did the trick. I will try loading it up on the unit tomorrow. Most of my numbers have parens around the area code and hyphens between prefix and suffix so I am anticipating that I may have a problem there. We'll see. Thanks again. Quote Link to post Share on other sites
osubeaver Posted August 26, 2009 Report Share Posted August 26, 2009 Worked like a charm, parentheses and all. Quote Link to post Share on other sites
Asinine Posted October 27, 2009 Report Share Posted October 27, 2009 Does this method bypass the 400 number limit? I've pared my contact list to the minimum needed to get my work done, but the upload still stops around P .... Quote Link to post Share on other sites
avic_weo Posted October 28, 2009 Author Report Share Posted October 28, 2009 Does this method bypass the 400 number limit? I've pared my contact list to the minimum needed to get my work done, but the upload still stops around P .... I couldn't tell: I don't have +400 numbers in my phone It wll let you make a selection of the numbers though, by using the filter category hth, Weo Quote Link to post Share on other sites
Asinine Posted November 10, 2009 Report Share Posted November 10, 2009 I tried it with 400+ contacts, most with multiple numbers, so probably 600+ numbers total, and they all showed up on my F90BT. Excellent macro and workaround, thanks! Quote Link to post Share on other sites
Marlysa Posted November 22, 2009 Report Share Posted November 22, 2009 I updated it a little for french letters and for the method to select only one part of contact according one categorie. You can find my update version with tutorial here : Export your outlook contact to AVIC- French version + TUTO [For the moment only in french but if you are interested in it I could prepare one in english] Quote Link to post Share on other sites
avic_weo Posted November 23, 2009 Author Report Share Posted November 23, 2009 Marlysa, Had a look at your french post (oui, je parle francais aussi), but I have to make the same comment as I did to Magna on http://avic411.com/forum/posting.php?mode=reply&f=34&t=25308#pr183319: there is a problem on line 132: Call PrintSQLElement(myItem.FullName, myItem.OtherTelephoneNumber, numQual * 0) Other than that: I am glad this macro is appreciated Weo Quote Link to post Share on other sites
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.