Forum: Outlook and VBA
July 22nd 09, 04:52 PM Posted to microsoft.public.outlook.program_vba
|
Replies: 11
Views: 1,831
Move email using the Close event
I do apologise, I missed a line of code when cpying and pasting. The
contents of Class1 should be:-
Dim WithEvents myMailItem As MailItem
Dim WithEvents myInspectors As Inspectors
Dim myDestFolder...
|
Forum: Outlook and VBA
July 22nd 09, 03:56 PM Posted to microsoft.public.outlook.program_vba
|
Replies: 11
Views: 1,831
Move email using the Close event
It will do because you are not correctly setting myItem in the first place.
Create yourself a new Class (let's say it's called Class1) and insert the
following code into it:-
Dim WithEvents...
|
Forum: Outlook and VBA
July 22nd 09, 03:10 PM Posted to microsoft.public.outlook.program_vba
|
Replies: 11
Views: 1,831
Move email using the Close event
I think I see your problem. When you open Outlook you are setting myItem to
be the CurrentItem of the ActiveInspector (within the Application_Startup
Sub). Surely when you open outlook you won't...
|
Forum: Outlook and VBA
July 22nd 09, 02:59 PM Posted to microsoft.public.outlook.program_vba
|
Replies: 11
Views: 1,831
Move email using the Close event
At which line of code does the process fail? Have you tried stepping it
though?
--
Alan Moseley IT Consultancy
http://www.amitc.co.uk
If I have solved your problem, please click Yes below. ...
|
Forum: Outlook and VBA
July 22nd 09, 11:48 AM Posted to microsoft.public.outlook.program_vba
|
Replies: 11
Views: 1,831
Move email using the Close event
You are creating a separate process for your myApp object, which you don't
need and will cause problems. Your code doesn't actaully use the myApp
object anywhere so you don't need any of them, but...
|
Forum: Outlook and VBA
July 21st 09, 04:13 PM Posted to microsoft.public.office.developer.outlook.vba,microsoft.public.outlook,microsoft.public.outlook.program_vba
|
Replies: 4
Views: 1,242
Insert date at cursor location
What about this?
Public Sub InsertDate()
SendKeys Date()
End Sub
It's a bit pants and you might want to do some checking before the sendkeys
runs, but it might work for you.
--
Alan Moseley...
|
Forum: Outlook - General Queries
July 21st 09, 04:13 PM Posted to microsoft.public.office.developer.outlook.vba,microsoft.public.outlook,microsoft.public.outlook.program_vba
|
Replies: 4
Views: 929
Insert date at cursor location
What about this?
Public Sub InsertDate()
SendKeys Date()
End Sub
It's a bit pants and you might want to do some checking before the sendkeys
runs, but it might work for you.
--
Alan Moseley...
|
Forum: Outlook and VBA
July 21st 09, 03:14 PM Posted to microsoft.public.outlook.program_vba
|
Replies: 4
Views: 740
Synchronization error event
What about using a piece of code that calculates how long a mail has been
sitting in your outbox, and if it is over a specified value (depending upon
how often your send/receive is configured) then...
|
Forum: Outlook and VBA
July 10th 09, 04:13 PM Posted to microsoft.public.outlook.program_vba
|
Replies: 7
Views: 3,185
Folders & Subfolders
Firstly add a reference to Outlook within your project. Secondly import the
namespace before the beginning of your class, ie:-
Imports Microsoft.Office.Interop.Outlook
--
Alan Moseley IT...
|
Forum: Outlook and VBA
July 10th 09, 02:48 PM Posted to microsoft.public.outlook.program_vba
|
Replies: 7
Views: 3,185
Folders & Subfolders
You need to write a sub or function that is recursively called by itself.
For example:-
Public Sub ProcessAllFolders()
Dim fld As MAPIFolder
For Each fld In...
|
Forum: Outlook and VBA
July 9th 09, 10:04 AM Posted to microsoft.public.outlook.program_vba
|
Replies: 12
Views: 1,965
|
Forum: Outlook and VBA
July 8th 09, 08:49 AM Posted to microsoft.public.outlook.program_vba
|
Replies: 12
Views: 1,965
|
Forum: Outlook and VBA
July 7th 09, 01:11 PM Posted to microsoft.public.outlook.program_vba
|
Replies: 3
Views: 2,916
|
Forum: Outlook and VBA
July 7th 09, 10:40 AM Posted to microsoft.public.outlook.program_vba
|
Replies: 6
Views: 1,160
trap outbound mail to update subject
Hook into the Application.ItemSend event in the ThisOutlookSession code
window. It gets passed the email that is being sent so that you can
manipulate it:-
Private Sub Application_ItemSend(ByVal...
|
Forum: Outlook and VBA
July 7th 09, 10:30 AM Posted to microsoft.public.outlook.program_vba
|
Replies: 12
Views: 1,965
|
Forum: Outlook and VBA
July 6th 09, 07:07 PM Posted to microsoft.public.outlook.program_vba
|
Replies: 12
Views: 1,965
Run A Script not listed in rules wizard
In Rules and Alerts click New Rule
Click 'Start From A Blank Rule' and choose a Step 1 option. Click Next
Select one or more conditions and click 'Next'
Under Select Action you should see an option...
|
Forum: Outlook and VBA
July 2nd 09, 01:08 PM Posted to microsoft.public.outlook.program_vba
|
Replies: 1
Views: 2,855
Expand Distribution List on Send
Does the code at the following url help?
http://blogs.msdn.com/webdav_101/archive/2007/11/29/howto-cdo-1-21-vb-expand-a-distribution-list.aspx
--
Alan Moseley IT...
|
Forum: Outlook and VBA
July 2nd 09, 12:42 PM Posted to microsoft.public.outlook.program_vba
|
Replies: 3
Views: 2,916
|
Forum: Outlook and VBA
July 1st 09, 02:00 PM Posted to microsoft.public.outlook.program_vba
|
Replies: 2
Views: 2,327
|
Forum: Outlook and VBA
May 29th 09, 11:07 AM Posted to microsoft.public.outlook.program_vba,microsoft.public.word.docmanagement
|
Replies: 1
Views: 2,112
send email at future date/time?
I think you are needing the DeferredDeliveryTime property. For example:-
Public Sub SendLater()
Dim x As MailItem
Set x = Outlook.CreateItem(olMailItem)
x.To =...
|
Forum: Outlook and VBA
March 12th 09, 02:14 PM Posted to microsoft.public.outlook.program_vba
|
Replies: 4
Views: 1,302
Event of Changing the Task Status
Try the following within your ThisOutlookSession code window:-
Dim WithEvents myTasks As Items
Private Sub Application_Startup()
Set myTasks =...
|
Forum: Outlook and VBA
February 23rd 09, 07:06 PM Posted to microsoft.public.outlook.program_vba
|
Replies: 3
Views: 1,046
Import Macro Access Table to Outlook Contacts
Have a look at the following web page, it contains all of the information you
need:-
http://support.microsoft.com/kb/290658
--
Alan Moseley IT Consultancy
http://www.amitc.co.uk
If I have solved...
|
Forum: Outlook and VBA
February 21st 09, 08:29 AM Posted to microsoft.public.outlook.program_vba
|
Replies: 4
Views: 878
|
Forum: Outlook and VBA
February 20th 09, 12:18 PM Posted to microsoft.public.outlook.program_vba
|
Replies: 11
Views: 1,093
Cycle through all folders under Mailbox
Find out which folder the code is failing at. Now browse to that folder in
your folder list. You will probably find that 'J VIEW' is not a view that
you can choose from. 'J VIEW' must exist for...
|
Forum: Outlook and VBA
February 20th 09, 10:50 AM Posted to microsoft.public.outlook.program_vba
|
Replies: 4
Views: 878
|