New to version 2.0, [[twab]] provides support to export your contact information into any of the built-in formats.  Additionally, you can customize your export by creating your own mapping file.

Below are the instructions for exporting your contacts.

! Step 1: Select a Format
If you are simply backing up your data, you may be fine with using the built-in export format, which you can see in [[TwabDefaultFieldMap]].  If you are exporting your contacts for other reasons, though, you may want them to be exported into a built-in or custom format.  For instance, you may want to do this if you are exporting your contacts for import into Yahoo! or Google.

If you want to export to the default format, you don't need to do anything to configure [[twab]].

If you want to export into Yahoo, Google, MSN, or Outlook formats, you should create a Tiddler called [[TwabExport]] and give it a tag corresponding to the format in which you want the contacts to be in.  The list below summarizes the options:

* If you want Yahoo! CSV format, tag [[TwabExport]] with "format:yahoo"
* If you want MSN CSV format, tag [[TwabExport]] with "format:msn" (see note below)
* If you want Google CSV format, tag [[TwabExport]] with "format:google" (see note below)
* If you want Outlook CSV format, tag [[TwabExport]] with "format:outlook"

If you want a custom export format, you should place a tag called "format:<Tiddler>" on the [[TwabExport]] tiddler, where "<Tiddler>" is the name of the tiddler that you created with the mappings.  For example, if you create a mapping tiddler called ~PalmTiddler, you would tag [[TwabImport]] as "format:PalmTiddler".  See [[About:twab:Import]] for more information on custom mappings.

''Note to Hotmail Users:'' As you might expect, MSN doesn't make things easy.  In my testing, I was having problems importing a file into Hotmail.  I decided to export my contacts from Hotmail and then reimport them as-is just to see if it would work.  What I found was that the CSV file that Hotmail generated on export was incomplete.  Even after I fixed the file myself, MSN would not import its own file properly.  Strangely, Google and Yahoo had no problem importing the same (corrected) file that MSN generated.  So word of warning - importing any data into MSN might not work properly.  Blame Microsoft :)

''Note to Google Users:'' Google suggests using Outlook, Outlook Express, or Yahoo CSV formats when importing your contacts into your Google account.  With that in mind, [[twab]] will automatically use the Outlook mapping for Google export when you place the "format:google" tag on [[TwabExport]].  You most likely won't need to know that's the case, but I document it here just in case.

! Step 2: Create an Export Button
You can embed the twab export button in any Tiddler by adding the following code:
{{{
<<twab Export AddressBook>>
}}}
Which will result in: <<twab Export AddressBook>>.

This exports all contacts into a Tiddler whose name is given in the the [[TwabPlugin]] code.  See [[About:twab:Tweaks]] for information on how to customize what Tiddler the export is written to.  This button is always accessible in the [[TwabPlugin]] Tiddler in case you don't want to create  a new Tiddler just for this reason.

Unlike import, multiple tags are supported but only the first tag will be used.  So if you have
{{{
<<twab Export AddressBook myContacts>>
}}}

[[twab]] will currently only export tiddlers tagged with "AddressBook".  Also, it's important to note that the 3rd parameter is not required.  If it's not provided [[twab]] will use the default tag name - see [[About:twab:Tweaks]] for more information.

! Step 3: Hit the Button
Go ahead, try it above.  The Tiddler will be created if it doesn't exist or overwritten if it does exist.  The format of the data will match the tag that you gave the Tiddler.

! Step 4: Save the Data or Import
You can now take that data and either save it for backups or import it into your target system.  Since export is read-only, you don't have to worry about any data corruption when exporting your contacts.