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

VBA & Outlook 2003 objMail.Send Security problem



 
 
Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1  
Old April 23rd 08, 03:02 PM posted to microsoft.public.outlook.program_vba
Jeremy Melvin
external usenet poster
 
Posts: 1
Default VBA & Outlook 2003 objMail.Send Security problem

I am wanting to take an incoming email from 'someone' and then resend it
automatically. I am using a Outlook Rule to start the VBA program when the
email comes in, and using the VBA program to copy the body and resend to a
mobile number.
I keep reading conflicting statements from my searches on the web and these
fourms about being able to send without getting the Security prompt from OMG.
Could some one please let me know if it is possible for me to do this using
the native VBA in Outlook by changing my code without using a third-party or
sendkeys program?
Here is my code:
Sub ForwardAsSMSTo12345(MyMail As MailItem)
Dim strID As String
Dim olNS As Outlook.NameSpace
Dim msgIn As Outlook.MailItem
Dim msgOut As Outlook.MailItem
strID = MyMail.EntryID
Set olNS = Application.GetNamespace("MAPI")
Set msgIn = olNS.GetItemFromID(strID)
Set msgOut = CreateItem(olMailItem)
msgOut.BodyFormat = olFormatPlain
msgOut.Subject = "From ML1500"
msgOut.Body = msgIn.Body
msgOut.To = "
msgOut.Send
Set msgIn = Nothing
Set msgOut = Nothing
Set olNS = Nothing
End Sub


 




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
Outlook security prompt - having problem getting rid of it Sue Mosher [MVP-Outlook] Outlook - General Queries 0 June 4th 07 12:28 PM
Outlook security prompt - having problem getting rid of it Sue Mosher [MVP-Outlook] Outlook - Installation 0 June 4th 07 12:28 PM
Outlook security prompt - having problem getting rid of it Sue Mosher [MVP-Outlook] Outlook and VBA 0 June 4th 07 12:28 PM
Send-Receive problem in Outlook 2003 [email protected] Outlook - General Queries 1 July 9th 06 06:42 PM
Outlook 2003 Send problem trasmus Outlook - General Queries 3 January 17th 06 09:06 PM


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