

- #Microsoft color index custom formatting excel msdn how to
- #Microsoft color index custom formatting excel msdn code
#Microsoft color index custom formatting excel msdn code
If you are using Outlook 2003, you need to edit the code a little, as Outlook 2003 uses colored flags. Set Selection = currentExplorer.Selection Set currentExplorer = Application.ActiveExplorer Use this macro to mark flagged message complete and remove any categories assigned to the message. Mark Flags Completed and Remove Categories See Run a Script rules for more information on using Run a Script rules. Public Sub FlagMessage(Item As Outlook.MailItem) To use the macro in run a script rule, use the following code sample. Private Sub olItem_ItemAdd(ByVal Item As Object) Set olItem = objNS.GetDefaultFolder(olFolderInbox).Items Don't forget to set your macro security to low during testing then use SelfCert to sign it when you are satisfied it works as expected. To use this code, paste it into ThisOutlookSession, click in the Application_Startup macro and click the Run button. You could use an If statement to restrict which messages are flagged, or convert it to a run a script macro and use a rule to filter the messages. In this example, I have an ItemAdd macro. If you want to flag all messages as they arrive, you can use an ItemAdd macro, or use a rule with a run a script macro. RemindMeOn = InputBox("Enter the reminder date in any valid short date (m/d/y) format") In this code, any valid short date format should work: 4/1, 4/1/17, or.

To enter a specific date, use this code, with the DIM statement at the top, the InputBox before the With Item line, and replace the TaskDueDate line with the one below. To enter a number for days from now, use this code, with the DIM statement at the top, the InputBox before the With Item line, and replace the TaskDueDate line with the one below.ĬountDays = InputBox("How many days from now?") If you want to choose your own date, you'll need to use an InputBox and enter either 'a days from now' value or a date (in any valid short date format). The macro samples above use a predefined date for the flag (and/or reminder). This variation of the above macro uses a button on the ribbon to click Yes rather than the message box as the message is sent.Īdd the SayYes macro to the message form ribbon and click it before sending any message that you want to flag for follow-up. If MsgBox(prompt$, vbYesNo + vbQuestion + vbMsgBoxSetForeground, "Add flag?") = vbYes Then Prompt$ = "Do you want to flag this message for followup?" Private Sub olSentItems_ItemAdd(ByVal Item As Object)

Set olSentItems = objNS.GetDefaultFolder(olFolderSentMail).Items ' instantiate objects declared WithEvents It waits for a message to hit the Sent folder then asks if you want to flag it.īecause this is an Application_Startup macro, you need to click in Application_Startup code and click Run to test it. This macro will ask if you want to flag a message after sending it. If you use olMarkToday and set the due date for next week, it's converted to a 'next week' flag. MarkAsTask line, the flag will be the 'people flag'. FlagRequest = "Call " & objMsg.SenderName To use the macro, open or select a message and run the macro.

#Microsoft color index custom formatting excel msdn how to
Paste it in the module following this macro.įor more information on using VBA, see How to use the VBA Editor. You'll also need the GetCurrentItem function from Work with an open or selected Outlook item. Paste the macro into the module and edit as needed. Right click on Project1 and choose Insert > Module. Same thing when I try doing from Excel it does not work anymore.I am sure it used to earlier.Īlso I do no see the Distributed anymore and laso how do i get the numeric values for the above table as well as for the Alignment Property.To create the macro, open the VBA editor using Alt+F11. Will the code be able to read the Font Color Code and Fill Color Code no from individual cell with conditional formatting rather than looking at a Range, In case, if we were to provide a cell range for example A2 where the Font Color is red and the Fill Color is Yellow and in cell A3 Font Color is Blue and the Fill Color is Orange then is it possible to just to give the Range as A2 or A3 and get both the details.as well as if the other aspects such as the Font Bold and Italics. Interior Color and if possible other aspects such as Font.Italics or Font.Bold too using VBA? If i have more than three criterions in my conditional format, then is it possible to get the Font Color, Fill Color i.e. Font.ColorIndex it gives the number only for the color which is applied manually and not for any color via conditional formatting. Is it possible to get the Color Codes like Color Nos for cells which have conditional formatting. How to get the Font Color, Fill Color of cells with Conditional Formatting for more than 3 criterias using VBA?
