A Microsoft Outlook email forum. Outlook Banter

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » Outlook Banter forum » Search Forums
Site Map Home Register Authors List Search Today's Posts Mark Forums Read Web Partners

Showing results 1 to 25 of 61
Search took 0.46 seconds.
Search: Posts made by: Alan Moseley
Forum: Outlook and VBA July 22nd 09, 04:52 PM Posted to microsoft.public.outlook.program_vba
Replies: 11
Views: 1,831
Posted By Alan Moseley
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
Posted By Alan Moseley
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
Posted By Alan Moseley
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
Posted By Alan Moseley
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
Posted By Alan Moseley
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
Posted By Alan Moseley
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
Posted By Alan Moseley
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
Posted By Alan Moseley
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
Posted By Alan Moseley
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
Posted By Alan Moseley
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
Posted By Alan Moseley
STILL IS NOT AVAILABLE... Run A Script not listed in rules wiz

Does this help?

Public Sub SaveACopy(objMailItem As MailItem)
Dim objMailCopy As MailItem
Dim objNamespace As NameSpace
Dim objPublicFolder As MAPIFolder
Dim objAttachment As...
Forum: Outlook and VBA July 8th 09, 08:49 AM Posted to microsoft.public.outlook.program_vba
Replies: 12
Views: 1,965
Posted By Alan Moseley
STILL IS NOT AVAILABLE... Run A Script not listed in rules wiz

Your code works perfectly on my stand-alone Outlook. I fear therefore that,
as Ms Mosher has already suggested, that the Outlook security has been
tightened up by your administrators.

Do you have...
Forum: Outlook and VBA July 7th 09, 01:11 PM Posted to microsoft.public.outlook.program_vba
Replies: 3
Views: 2,916
Posted By Alan Moseley
Calendar private appointments, an unresolved question...

GetFreeBusy does not get the start and end times of appointments as you have
probably figured out. If a user has created an appointment in their
calendar, it will detect whether they have set the...
Forum: Outlook and VBA July 7th 09, 10:40 AM Posted to microsoft.public.outlook.program_vba
Replies: 6
Views: 1,160
Posted By Alan Moseley
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
Posted By Alan Moseley
STILL IS NOT AVAILABLE... Run A Script not listed in rules wizard

If your script is written within Outlook VBA then it should be possible to
write your code so that the warnings do not appear. Do you have any lines of
code similar to:-

Set objOutlook = New...
Forum: Outlook and VBA July 6th 09, 07:07 PM Posted to microsoft.public.outlook.program_vba
Replies: 12
Views: 1,965
Posted By Alan Moseley
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
Posted By Alan Moseley
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
Posted By Alan Moseley
Calendar private appointments, an unresolved question...

You need to use the GetFreeBusy method of the AddressEntry object to do this.
--
Alan Moseley IT Consultancy
http://www.amitc.co.uk

If I have solved your problem, please click Yes below. ...
Forum: Outlook and VBA July 1st 09, 02:00 PM Posted to microsoft.public.outlook.program_vba
Replies: 2
Views: 2,327
Posted By Alan Moseley
Copy Entire Email Content - Paste into new Task

This will do pretty much what you ask. Copy the Sub below into your
ThisOutlookSession code window. Open up an email that you want to create a
task for, and run the macro.

Public Sub...
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
Posted By Alan Moseley
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
Posted By Alan Moseley
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
Posted By Alan Moseley
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
Posted By Alan Moseley
Microsoft Visual Basic code has lost function in Outlook 2007

So you did actually have to switch off the security then? If this is the
case then did you try it again AFTER restarting Outlook?

Did you type the function code into the ThisOutlookSession code...
Forum: Outlook and VBA February 20th 09, 12:18 PM Posted to microsoft.public.outlook.program_vba
Replies: 11
Views: 1,093
Posted By Alan Moseley
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
Posted By Alan Moseley
Microsoft Visual Basic code has lost function in Outlook 2007

Check your Outlook Macro Security settings. If Macros have been disabled
this would prevent your VBA from running.

--
Alan Moseley IT Consultancy
http://www.amitc.co.uk

If I have solved your...
Showing results 1 to 25 of 61

 
Forum Jump

All times are GMT +1. The time now is 02:27 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.Search Engine Friendly URLs by vBSEO 2.4.0
Copyright ©2004-2025 Outlook Banter.
The comments are property of their posters.