By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
428,786 Members | 2,241 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 428,786 IT Pros & Developers. It's quick & easy.

Smart Tags

P: 4
I need to create a smart tag that allows me to create "outlook tasks" from my Access Database.
Oct 23 '06 #1
Share this Question
Share on Google+
2 Replies


100+
P: 143
Open the form in design view. In the text boxes property select the Data tab. Never used them myself. More on smart tags here.

http://office.microsoft.com/en-gb/ma...504821033.aspx
Oct 23 '06 #2

MMcCarthy
Expert Mod 10K+
P: 14,534
Here is some code for the various outlook procedures. You could break them into functions in a module. Then use them as required.

Expand|Select|Wrap|Line Numbers
  1.  
  2. ' Start Outlook. . . If it is already running, you'll use the same instance... 
  3. Dim olApp As Outlook.Application 
  4. Set olApp = CreateObject("Outlook.Application") 
  5.  
  6. ' Logon.  Doesn't hurt if you are already running and logged on... 
  7. Dim olNs As Outlook.NameSpace 
  8. Set olNs = olApp.GetNamespace("MAPI") 
  9. olNs.Logon 
  10.  
  11. ' Create and Open a new contact. 
  12. Dim olItem As Outlook.ContactItem 
  13. Set olItem = olApp.CreateItem(olContactItem) 
  14.  
  15. ' Setup Contact information... 
  16. With olItem 
  17.     .FullName = "James Smith" 
  18.     .Birthday = "9/15/1975" 
  19.     .CompanyName = "Microsoft" 
  20.     .HomeTelephoneNumber = "704-555-8888" 
  21.     .Email1Address = "someone@microsoft.com" 
  22.     .JobTitle = "Developer" 
  23.     .HomeAddress = "111 Main St." & vbCr & "Charlotte, NC 28226" 
  24. End With 
  25.  
  26. ' Save Contact... 
  27. olItem.Save 
  28.  
  29. ' Create a new appointment. 
  30. Dim olAppt As Outlook.AppointmentItem 
  31. Set olAppt = olApp.CreateItem(olAppointmentItem) 
  32.  
  33. ' Set start time for 2-minutes from now... 
  34. olAppt.Start = Now() + (2# / 24# / 60#) 
  35.  
  36. ' Setup other appointment information... 
  37. With olAppt 
  38.     .Duration = 60 
  39.     .Subject = "Meeting to discuss plans..." 
  40.     .Body = "Meeting with " & olItem.FullName & " to discuss plans." 
  41.     .Location = "Home Office" 
  42.     .ReminderMinutesBeforeStart = 1 
  43.     .ReminderSet = True 
  44. End With 
  45.  
  46. ' Save Appointment... 
  47. olAppt.Save 
  48.  
  49. ' Send a message to your new contact. 
  50. Dim olMail As Outlook.MailItem 
  51. Set olMail = olApp.CreateItem(olMailItem) 
  52.  
  53. ' Fill out & send message... 
  54. olMail.To = olItem.Email1Address 
  55. olMail.Subject = "About our meeting..." 
  56. olMail.Body = _ 
  57.     "Dear " & olItem.FirstName & ", " & vbCr & vbCr & vbTab & _ 
  58.     "I'll see you in 2 minutes for our meeting!" & vbCr & vbCr & _ 
  59.     "Btw: I've added you to my contact list." 
  60. olMail.Send 
  61.  
  62. ' Clean up... 
  63. MsgBox "All done...", vbMsgBoxSetForeground 
  64. olNS.Logoff 
  65. Set olNs = Nothing 
  66. Set olMail = Nothing 
  67. Set olAppt = Nothing 
  68. Set olItem = Nothing 
  69. Set olApp = Nothing 
  70.  
  71.  
Oct 23 '06 #3

Post your reply

Sign in to post your reply or Sign up for a free account.