Quick Search


Tibetan singing bowl music,sound healing, remove negative energy.

528hz solfreggio music -  Attract Wealth and Abundance, Manifest Money and Increase Luck



 
Your forum announcement here!

  Free Advertising Forums | Free Advertising Board | Post Free Ads Forum | Free Advertising Forums Directory | Best Free Advertising Methods | Advertising Forums > Free Advertising Forums Directory > General Free Advertising Forums

General Free Advertising Forums This is a list of general free advertising forums. Also referred to as free classfied ad forums.

 
 
Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
Old 05-12-2011, 04:38 PM   #1
wiooive355
 
Posts: n/a
Default Office Pro Plus 2007 Integrating Access Contacts w

There was a query on our publish about finding Entry to realize tables as exact WSS table templates around what else you ought to do to acquire the new Add From Outlook characteristic to labor on a customized contacts table. This aspect uses the same mechanism to determine that a table is a contact table,Office Pro Plus, but more than that it needs to know how to map fields in your table to those in the Outlook contact store. There are a bunch of fields, so easier than building this out yourself, here's a quick snippet of VBA that will take any table, and make it into a contacts table. Just plop this into your solution, then update the table name and field names to reflect the fields in your customized contacts implementation, and run it. -----------------------------------------------
' READ THIS
' Make edits to the string values in the
' MakeContacts Sub below to match up
' with your table and field names.
'
' You shouldn't have to change the rest of
' this code.
' -----------------------------------------------
' CI is for ContactInfo
Enum CI
First
Last
Email
Company
JobTitle
WorkPhone
HomePhone
CellPhone
WorkFax
WorkAddress
WorkCity
WorkState
WorkZip
WorkCountry
WebPage
Comments
End Enum
' Each field map item maps between a field
' name in the Entry table and a property
' name Access maps to Outlook and SharePoint
' contact field info.
Type FieldMap
prop As String
Field As String
End Type
' This Varible lists all the proeprties that
' can be mapped to Contact info. You fill
' it with the corresponding field names from
' your table.
Dim Map(CI.Comments) As FieldMap
Public Sub MakeContacts()
Dim strTable As String
Dim fm As FieldMap
Dim td As TableDef
Dim db As Database
' -----------------------------------------------
' UPDATE THESE STRINGS
' to match the table and field names in
' your app. It is okay not to set some if you
' don't have an equivalent.
' Set this to your table name
strTable = "Table1"
' Set these to your field names
Map(CI.First).Field = "First"
Map(CI.Last).Field = "Last"
Map(CI.Email).Field = "Email"
Map(CI.Company).Field = "Org"
Map(CI.JobTitle).Field = "Job"
Map(CI.WorkPhone).Field = "Work"
Map(CI.HomePhone).Field = "Home"
Map(CI.CellPhone).Field = "Cell"
Map(CI.WorkFax).Field = "Fax"
Map(CI.WorkAddress).Field = "Addr"
Map(CI.WorkCity).Field = "City"
Map(CI.WorkState).Field = "State"
Map(CI.WorkZip).Field = "Zip"
Map(CI.WorkCountry).Field = "Country"
Map(CI.WebPage).Field = "WWW"
Map(CI.Comments).Field = "Notes"
' END OF STRINGS TO UPDATE
' -----------------------------------------------
' This the code to mark fields in
' your local table with the correct
' Outlook and SharePoint field names.
'
' You shouldn't have to change this.
SetupContactProps
Set db = CurrentDb
Set td = db.TableDefs(strTable)
' Set the table level property that tells Access
' this is a Contact table.
SetProp td, "WSSTemplateID", dbInteger, 105
' For each mapped field, set the correct
' contacts property.
For i = 0 To CI.Comments
fm = Map(i)
If Len(fm.Field) > 0 Then
SetProp td.Fields(fm.Field), "WSSFieldID", dbText, fm.prop
End If
Next
End Sub
' This code initializes the contact property
' names that Access uses to map contact info
' to SharePoint or Outlook.
'
' You shouldn't have to change this.
Sub SetupContactProps()
Map(CI.First).prop = "FirstName"
Map(CI.Last).prop = "Title"
Map(CI.Email).prop = "Email"
Map(CI.Company).prop = "Company"
Map(CI.JobTitle).prop = "JobTitle"
Map(CI.WorkPhone).prop = "WorkPhone"
Map(CI.HomePhone).prop = "HomePhone"
Map(CI.CellPhone).prop = "CellPhone"
Map(CI.WorkFax).prop = "WorkFax"
Map(CI.WorkAddress).prop = "WorkAddress"
Map(CI.WorkCity).prop = "WorkCity"
Map(CI.WorkState).prop = "WorkState"
Map(CI.WorkZip).prop = "WorkZip"
Map(CI.WorkCountry).prop = "WorkCountry"
Map(CI.WebPage).prop = "WebPage"
Map(CI.Comments).prop = "Comments"
End Sub
' This is a helper routine which sets a property
' value first checking to see whether one already
' exists.
Sub SetProp(o As Object,Office Pro Plus, strProp As String,Office 2010 Download, dbType As DataTypeEnum, oValue As Variant)
Dim p As Property
On Error GoTo NotFound
Set p = o.Properties(strProp)
GoTo Found
NotFound:
Set p = CurrentDb.CreateProperty(strProp, dbType,Office Pro Plus 2007, oValue)
o.Properties.Append p
Found:
If p.Type = dbType Then
p.value = oValue
Else
o.Properties.Delete (strProp)
Set p = CurrentDb.CreateProperty(strProp, dbType,Office Pro 2010, oValue)
End If
End Sub
  Reply With Quote
 


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off


All times are GMT. The time now is 10:38 AM.

 

Powered by vBulletin Version 3.6.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Free Advertising Forums | Free Advertising Message Boards | Post Free Ads Forum