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

Security Warning about stored email



 
 
Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #7  
Old October 21st 08, 03:13 PM posted to microsoft.public.outlook.program_vba
DStrong
external usenet poster
 
Posts: 18
Default Security Warning about stored email

This is running in ThisOutlookSession of Outlook. The error comes at the line
Set objMail = Application.ActiveInspector.CurrentItem

I appreciate your advice on the saveas options for me. In your first post
you asked
"May I ask why you are going through those hoops instead of using the SaveAs
method of a MailItem and using the olMSG argument for the type of save?"

The answer would be I do not know how that is done. I am very new to VBA
programming in outlook and am trying to learn as I go. I have used what
worked as a temp solution which was the sendkeys function, but that function
irritates the heck out of the users who use this macro. I am getting Sue's
Outlook Programming book this evening from my local library so maybe I can
learn some more from that.

Your suggestion in you question sounds like a viable solution, I just do not
know how to code that. The work environment we are in is a remote connection
using a Citrix connection, and it is through this that my users need to save
the emails. They have a C drive and a my documents section that they can save
to, but since everyones username is different, I have not found a solution
that can give me a dynamic path to a users folders. Having the open dialog
box of a location the user can choose where to save the email seems like the
best solution, as this lets them choose their own save location. The problem
is people forget to change the file type to outlooks .msg. Does this make
more sense?

Much thanks!
David


"Ken Slovak - [MVP - Outlook]" wrote:

And what line is the error on? If the code is running in the Outlook VBA
project then Application doesn't need declaration. If it's running in some
other VBA project (Word, Excel, etc.) then you can't use Application, you
have to declare and instantiate an Outlook.Application object.

If you are happy with how things work using SendKeys then continue to do so.
You had asked how to avoid using SendKeys and I provided a couple of ways of
how I'd do it. If those are unsuitable for your purposes then stick to what
you have.

--
Ken Slovak
[MVP - Outlook]
http://www.slovaktech.com
Author: Professional Programming Outlook 2007.
Reminder Manager, Extended Reminders, Attachment Options.
http://www.slovaktech.com/products.htm


"DStrong" wrote in message
...
OK, Ken, I tried what you said below and have included my code as I get a
new
error message now. It says "variable or block with not set" I feel like it
says that I have not defined the Application line? Am I correct?

my code:
Sub ExGroup_Reply_PW()
'## adds group reply info only
Dim objMail As Outlook.MailItem

Set objMail = Application.ActiveInspector.CurrentItem
With objMail
.ReplyRecipients.Add "
End With
End Sub


As for the save portion, that is all greek to me. I am not sure that I
would
be able to deploy something like that in this work environment. I am
looking
for a simple solution that does not include using sendkeys or something
too
complex. It seems that it should be a more simple solution. My sendkeys
code
was one line, it works, it just turns off NUM Lock and CAPS lock when ever
that code is run.



 




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 Warning dkschoonover Outlook and VBA 12 August 23rd 08 12:21 AM
Security Warning Loominator Outlook Express 2 December 4th 07 12:12 AM
Security warning Christian Goeller Outlook - General Queries 6 March 22nd 07 03:13 PM
How to disable security warning? Richard Lewis Haggard Outlook - General Queries 2 April 4th 06 04:07 PM
Internet Security Warning.... Jeff Outlook Express 3 March 29th 06 08:13 PM


All times are GMT +1. The time now is 03:40 PM.


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.