More Outlook Resource Sites

Microsoft Developer Network (MSDN)

FAQs and other general resources

Login

login
password
Remember me

You will need to register and log in if you want to download the source code for the Microsoft Outlook Programming book. The forums and code sharing areas are open to both registered and non-registered visitors.

share code 02-Sep-2010 22:31

Looking for help with Outlook programming projects — VSTO, add-ins, VBA, custom Outlook forms, etc.? You′ve come to the right place!

NEW! >> Subscribe to this site via RSS. For more RSS options, see the complete list of feeds on our main news page.

 

Code level: intermediate    Code area: Basic Outlook Printer Friendly Version
Title: VBScript: Add Task
Description: 'Prompts user for input (syntax: "@category subject [project]:notes #duedate"), saves this as a task in Microsoft Outlook. 'Note this is a stand-alone file (not launched from inside Outlook), intended so you can quickly create a task without the distraction of opening/navigating Outlook.
Date: 13-Jul-2007  09:14
Code level: intermediate
Code area: Basic Outlook
Posted by: Bob Menke
Body:
All 1comments
Page [ 1  
  10-Nov-2007  19:17   
Very Nice, Bob. Thank YOU!

How would one modify the script to insert values in the mileage and billing fields? (I use the Mileage to insert info about my projects -- so I wanted to replace the strProject with strMileage --, and I use the billing field to use as an ABCD priority system; yep, hacking Outlook a bit...)

Of course I know nothing about VB. But, using common sense, I've tried adding a Mileage variable:

Dim strInput, strSubject, strStatus, StrDueDate, strPercentComplete, strCategories, _
       strBody, strPriority, strProject, strMileage

 and then I "commented out" the project section and added this section :

  ' Mileage(s)
  intPos = InStr(strInput,"[")
  If intPos>0 Then
     strMileage = Mid(strInput,intPos+1,InStr(strInput,"]")-(intPos+1))
 strInput = Left(strInput,intPos-1) + Right(strInput,Len(strInput)-InStr(strInput,"]"))
  Else
     strMileage = ""
  End If


But... It doesn't work. So I'm obviously not doing this right. :)

Thank you in advance for any hint!

Menez
 
Page [ 1  
Post your comment



name        email