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 » Microsoft Outlook Email Newsgroups » Outlook and VBA
Site Map Home Register Authors List Search Today's Posts Mark Forums Read Web Partners

call Outlook Procedures from Excel



 
 
Thread Tools Search this Thread Display Modes
  #1  
Old July 9th 08, 12:25 PM posted to microsoft.public.outlook.program_vba
M Armaghan Khan
external usenet poster
 
Posts: 3
Default call Outlook Procedures from Excel

i am stuck in calling Outlook procedures in Excel macro how do i call and
which object should i choose to call Outlook Procedures Please Help!!!.

Ads
  #2  
Old July 9th 08, 01:01 PM posted to microsoft.public.outlook.program_vba
Sue Mosher [MVP-Outlook]
external usenet poster
 
Posts: 11,651
Default call Outlook Procedures from Excel

Before you can call any Outlook methods, you must instantiate an
Outlook.Application object. See
http://www.outlookcode.com/codedetail.aspx?id=83 for a code sample.
--
Sue Mosher, Outlook MVP
Author of Microsoft Outlook Programming: Jumpstart
for Administrators, Power Users, and Developers
http://www.outlookcode.com/jumpstart.aspx



"M Armaghan Khan" wrote:

i am stuck in calling Outlook procedures in Excel macro how do i call and
which object should i choose to call Outlook Procedures Please Help!!!.

  #3  
Old July 9th 08, 02:58 PM posted to microsoft.public.outlook.program_vba
M Armaghan Khan
external usenet poster
 
Posts: 3
Default call Outlook Procedures from Excel

Dear sue

thanks for your reply please see below i have mad a program in excel to copy
some file on my desktop and i want to email it to my ID but problem is i m
unable to run outlook procedure within excel macro i have created an object
of Outlook.application but i still don't understand how to call procedure of
Outlook
please see below code on the last line the error occurs it said object
required please tell me what object should i use it will be very helpful .



Sub Copy()


Application.OnTime Now + TimeValue("00:00:15"), "FileCopy1"

Application.OnTime Now + TimeValue("00:00:30"), "FileCopy2"
Dim myOlApp As Object
Dim myOlApp1 As Object

Set myOlApp = CreateObject("Outlook.Application")
project1.Module1.RechargeSending ''error on this line it says object
required




"Sue Mosher [MVP-Outlook]" wrote:

Before you can call any Outlook methods, you must instantiate an
Outlook.Application object. See
http://www.outlookcode.com/codedetail.aspx?id=83 for a code sample.
--
Sue Mosher, Outlook MVP
Author of Microsoft Outlook Programming: Jumpstart
for Administrators, Power Users, and Developers
http://www.outlookcode.com/jumpstart.aspx



"M Armaghan Khan" wrote:

i am stuck in calling Outlook procedures in Excel macro how do i call and
which object should i choose to call Outlook Procedures Please Help!!!.

  #4  
Old July 9th 08, 03:52 PM posted to microsoft.public.outlook.program_vba
Sue Mosher [MVP-Outlook]
external usenet poster
 
Posts: 11,651
Default call Outlook Procedures from Excel

So you're trying to call an Outlook VBA procedure from an Excel macro? The
only way that might work -- and it's unsupported -- is if the procedure is a
Public Sub or Function in the ThisOutlookSession module in Outlook VBA. The
syntax for a subroutine would be:

Set myOlApp = CreateObject("Outlook.Application")
myOlApp.MyProcedure

Again, this is an unsupported technique. If it doesn't work, we can't help
you. The alternative, as I'm sure you already know, is to put the code in
Excel VBA instead.
--
Sue Mosher, Outlook MVP
Author of Microsoft Outlook Programming: Jumpstart
for Administrators, Power Users, and Developers
http://www.outlookcode.com/jumpstart.aspx



"M Armaghan Khan" wrote:

thanks for your reply please see below i have mad a program in excel to copy
some file on my desktop and i want to email it to my ID but problem is i m
unable to run outlook procedure within excel macro i have created an object
of Outlook.application but i still don't understand how to call procedure of
Outlook
please see below code on the last line the error occurs it said object
required please tell me what object should i use it will be very helpful .

Sub Copy()

Application.OnTime Now + TimeValue("00:00:15"), "FileCopy1"
Application.OnTime Now + TimeValue("00:00:30"), "FileCopy2"
Dim myOlApp As Object
Dim myOlApp1 As Object

Set myOlApp = CreateObject("Outlook.Application")
project1.Module1.RechargeSending ''error on this line it says object
required


"Sue Mosher [MVP-Outlook]" wrote:

Before you can call any Outlook methods, you must instantiate an
Outlook.Application object. See
http://www.outlookcode.com/codedetail.aspx?id=83 for a code sample.

"M Armaghan Khan" wrote:

i am stuck in calling Outlook procedures in Excel macro how do i call and
which object should i choose to call Outlook Procedures Please Help!!!.

  #5  
Old July 10th 08, 10:32 AM posted to microsoft.public.outlook.program_vba
M Armaghan Khan
external usenet poster
 
Posts: 3
Default call Outlook Procedures from Excel

Dear Sue,

i m very thankful to your prompt reply i completed my task on your said
alternative way by putting the code in Excel VBA i realy not have any idea
about it. now my code is working fine Thanks a Lot.

well I love to learn Excel 2007 and outlook 2007 VBA so i can automate all
my tasks so please can you recommend me some great books and websites so i
can increase my knowledge.

"Sue Mosher [MVP-Outlook]" wrote:

So you're trying to call an Outlook VBA procedure from an Excel macro? The
only way that might work -- and it's unsupported -- is if the procedure is a
Public Sub or Function in the ThisOutlookSession module in Outlook VBA. The
syntax for a subroutine would be:

Set myOlApp = CreateObject("Outlook.Application")
myOlApp.MyProcedure

Again, this is an unsupported technique. If it doesn't work, we can't help
you. The alternative, as I'm sure you already know, is to put the code in
Excel VBA instead.
--
Sue Mosher, Outlook MVP
Author of Microsoft Outlook Programming: Jumpstart
for Administrators, Power Users, and Developers
http://www.outlookcode.com/jumpstart.aspx



"M Armaghan Khan" wrote:

thanks for your reply please see below i have mad a program in excel to copy
some file on my desktop and i want to email it to my ID but problem is i m
unable to run outlook procedure within excel macro i have created an object
of Outlook.application but i still don't understand how to call procedure of
Outlook
please see below code on the last line the error occurs it said object
required please tell me what object should i use it will be very helpful .

Sub Copy()

Application.OnTime Now + TimeValue("00:00:15"), "FileCopy1"
Application.OnTime Now + TimeValue("00:00:30"), "FileCopy2"
Dim myOlApp As Object
Dim myOlApp1 As Object

Set myOlApp = CreateObject("Outlook.Application")
project1.Module1.RechargeSending ''error on this line it says object
required


"Sue Mosher [MVP-Outlook]" wrote:

Before you can call any Outlook methods, you must instantiate an
Outlook.Application object. See
http://www.outlookcode.com/codedetail.aspx?id=83 for a code sample.

"M Armaghan Khan" wrote:

i am stuck in calling Outlook procedures in Excel macro how do i call and
which object should i choose to call Outlook Procedures Please Help!!!.

  #6  
Old July 10th 08, 01:16 PM posted to microsoft.public.outlook.program_vba
Sue Mosher [MVP-Outlook]
external usenet poster
 
Posts: 11,651
Default call Outlook Procedures from Excel

For Outlook, you might start with the book and web site in my signature below.
--
Sue Mosher, Outlook MVP
Author of Microsoft Outlook Programming: Jumpstart
for Administrators, Power Users, and Developers
http://www.outlookcode.com/jumpstart.aspx


"M Armaghan Khan" wrote:

well I love to learn Excel 2007 and outlook 2007 VBA so i can automate all
my tasks so please can you recommend me some great books and websites so i can increase my knowledge.


 




Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
how to call using microsoft outlook faisal Outlook - Using Contacts 1 December 28th 07 03:14 PM
OH YES I THINK THEY DID CALL MR BUT I DID NOT TALK TO THEM MY MAMA SAI CALL HER BACK LATER CUZ SHE IS DOING SOMETHG RIGHT NOW WHY DID YOU CALL ME NO THEIR IS ONLY ONE ME YES SIR Outlook Express 0 February 25th 07 08:12 AM
Stored procedures/automated reports Turbo Outlook - General Queries 3 February 8th 07 02:01 PM
Call macro stored in Excel workbook from Outlook's macro Gvaram Outlook and VBA 5 October 4th 06 06:26 AM
Standard procedures for meeting organizers Sue Mosher [MVP-Outlook] Outlook - Calandaring 0 January 20th 06 06:19 PM


All times are GMT +1. The time now is 01:49 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.