|
dev
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
How to access message body w/o Security Warning?for keywords. I used a suggestion from another thread on accessing the MailItem through the Application object, but I still get a security warning on the message body. (I'm running OL 2003 SP2.) I've seen that the typical response is to use "Redemption" but that's not an option b/c we're blocked from installing things at the workplace. Other Thread: http://groups.google.com/group/microsoft.public.office.developer.outlook.vba/browse_thread/thread/3354dcf760a5a929/2d712cb607421fa3?lnk=gst&rnum=6#2d712cb607421fa3 Here's my code so far: Private Sub Application_ItemSend _ (ByVal Item As Object, Cancel As Boolean) Dim oMail As Outlook.Mailitem Item.Save Set oMail = Application.Session.GetItemFromID(Item.EntryID) SearchWords(oMail.Body) End Sub Could anyone help? Thanks, Logan Out of process code will trigger the security prompts when you read Body or
HTMLBody or on access to any other restricted properties or methods. Your options are listed at http://www.outlookcode.com/article.aspx?id=52 -- Show quoteKen Slovak [MVP - Outlook] http://www.slovaktech.com Author: Professional Programming Outlook 2007 Reminder Manager, Extended Reminders, Attachment Options http://www.slovaktech.com/products.htm "AgapeDisciple" <AgapeDisci***@gmail.com> wrote in message news:1191421858.190323.289630@d55g2000hsg.googlegroups.com... > I'm trying to run a script that searches the message subject and body > for keywords. I used a suggestion from another thread on accessing the > MailItem through the Application object, but I still get a security > warning on the message body. (I'm running OL 2003 SP2.) > > I've seen that the typical response is to use "Redemption" but that's > not an option b/c we're blocked from installing things at the > workplace. > > Other Thread: > http://groups.google.com/group/microsoft.public.office.developer.outlook.vba/browse_thread/thread/3354dcf760a5a929/2d712cb607421fa3?lnk=gst&rnum=6#2d712cb607421fa3 > > Here's my code so far: > > Private Sub Application_ItemSend _ > (ByVal Item As Object, Cancel As Boolean) > Dim oMail As Outlook.Mailitem > Item.Save > Set oMail = Application.Session.GetItemFromID(Item.EntryID) > SearchWords(oMail.Body) > End Sub > > Could anyone help? > Thanks, > Logan > On Oct 3, 11:52 am, "Ken Slovak - [MVP - Outlook]"
<kenslo***@mvps.org> wrote: Show quote > Out of process code will trigger the security prompts when you read Body or Yeah, I've read that page over and over again. I don't understand why> HTMLBody or on access to any other restricted properties or methods. Your > options are listed athttp://www.outlookcode.com/article.aspx?id=52 > > -- > Ken Slovak > [MVP - Outlook]http://www.slovaktech.com > Author: Professional Programming Outlook 2007 > Reminder Manager, Extended Reminders, Attachment Optionshttp://www.slovaktech.com/products.htm > > "AgapeDisciple" <AgapeDisci***@gmail.com> wrote in message > > news:1191421858.190323.289630@d55g2000hsg.googlegroups.com... > > > > > I'm trying to run a script that searches the message subject and body > > for keywords. I used a suggestion from another thread on accessing the > > MailItem through the Application object, but I still get a security > > warning on the message body. (I'm running OL 2003 SP2.) > > > I've seen that the typical response is to use "Redemption" but that's > > not an option b/c we're blocked from installing things at the > > workplace. > > > Other Thread: > >http://groups.google.com/group/microsoft.public.office.developer.outl... > > > Here's my code so far: > > > Private Sub Application_ItemSend _ > > (ByVal Item As Object, Cancel As Boolean) > > Dim oMail As Outlook.Mailitem > > Item.Save > > Set oMail = Application.Session.GetItemFromID(Item.EntryID) > > SearchWords(oMail.Body) > > End Sub > > > Could anyone help? > > Thanks, > > Logan- Hide quoted text - > > - Show quoted text - this has worked for other ppl. What's makes this "out of process" code? In-process trusted code for Outlook 2003 runs as:
1. Outlook form code if all objects are derived from the intrinsic Application and Item objects. 2. Outlook VBA code if everything is derived from the intrinsic Application object. 3. Outlook COM adddin where the application object passed in OnConnection is used to derive everything. -- 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 "DISMfish" <DISMf***@gmail.com> wrote in message <snip>news:1191435313.685330.26500@n39g2000hsh.googlegroups.com... Show quote > Yeah, I've read that page over and over again. I don't understand why > this has worked for other ppl. What's makes this "out of process" > code? > And, if your code fits one of those scenarios but still throws security prompts, look on the Help | About Microsoft Outlook dialog. If it says Security Mode: Administrator Controlled, that means that it's up to the network administrator to determine which add-ins (#3 on Ken's list) and which methods and properties (for #1-3) won't trigger prompts.
-- Show quoteSue Mosher, Outlook MVP Author of Microsoft Outlook 2007 Programming: Jumpstart for Power Users and Administrators http://www.outlookcode.com/article.aspx?id=54 "Ken Slovak - [MVP - Outlook]" <kenslo***@mvps.org> wrote in message news:u%23RAN5gBIHA.1168@TK2MSFTNGP02.phx.gbl... > In-process trusted code for Outlook 2003 runs as: > > 1. Outlook form code if all objects are derived from the intrinsic > Application and Item objects. > > 2. Outlook VBA code if everything is derived from the intrinsic Application > object. > > 3. Outlook COM adddin where the application object passed in OnConnection is > used to derive everything. > > -- > 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 > > > "DISMfish" <DISMf***@gmail.com> wrote in message > news:1191435313.685330.26500@n39g2000hsh.googlegroups.com... > <snip> >> Yeah, I've read that page over and over again. I don't understand why >> this has worked for other ppl. What's makes this "out of process" >> code? >> >
Show quote
On Oct 3, 7:16 pm, "Sue Mosher [MVP-Outlook]" <sue***@outlookcode.com> Thanks for the responses. I check the About Outlook and the "Securitywrote: > And, if your code fits one of those scenarios but still throws security prompts, look on the Help | About Microsoft Outlook dialog. If it says Security Mode: Administrator Controlled, that means that it's up to the network administrator to determine which add-ins (#3 on Ken's list) and which methods and properties (for #1-3) won't trigger prompts. > > -- > Sue Mosher, Outlook MVP > Author of Microsoft Outlook 2007 Programming: > Jumpstart for Power Users and Administrators > http://www.outlookcode.com/article.aspx?id=54 > > "Ken Slovak - [MVP - Outlook]" <kenslo***@mvps.org> wrote in messagenews:u%23RAN5gBIHA.1***@TK2MSFTNGP02.phx.gbl... > > > > > In-process trusted code for Outlook 2003 runs as: > > > 1. Outlook form code if all objects are derived from the intrinsic > > Application and Item objects. > > > 2. Outlook VBA code if everything is derived from the intrinsic Application > > object. > > > 3. Outlook COM adddin where the application object passed in OnConnection is > > used to derive everything. > > > -- > > 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 > > > "DISMfish" <DISMf***@gmail.com> wrote in message > >news:1191435313.685330.26500@n39g2000hsh.googlegroups.com... > > <snip> > >> Yeah, I've read that page over and over again. I don't understand why > >> this has worked for other ppl. What's makes this "out of process" > >> code?- Hide quoted text - > > - Show quoted text - Mode" is set to "Default". Your ItemSend code is in the built-in ThisOutlookSession module, right? What happens if you replace it with this:
Private Sub Application_ItemSend(ByVal Item As Object, Cancel As Boolean) Debug.Print Left(Item.Body, 50) End Sub Do you get a security prompt? -- Show quoteSue Mosher, Outlook MVP Author of Microsoft Outlook 2007 Programming: Jumpstart for Power Users and Administrators http://www.outlookcode.com/article.aspx?id=54 "AgapeDisciple" <AgapeDisci***@gmail.com> wrote in message news:1191524527.003029.274550@n39g2000hsh.googlegroups.com... > On Oct 3, 7:16 pm, "Sue Mosher [MVP-Outlook]" <sue***@outlookcode.com> > wrote: >> And, if your code fits one of those scenarios but still throws security prompts, look on the Help | About Microsoft Outlook dialog. If it says Security Mode: Administrator Controlled, that means that it's up to the network administrator to determine which add-ins (#3 on Ken's list) and which methods and properties (for #1-3) won't trigger prompts. >> >> "Ken Slovak - [MVP - Outlook]" <kenslo***@mvps.org> wrote in messagenews:u%23RAN5gBIHA.1***@TK2MSFTNGP02.phx.gbl... >> >> > In-process trusted code for Outlook 2003 runs as: >> >> > 1. Outlook form code if all objects are derived from the intrinsic >> > Application and Item objects. >> >> > 2. Outlook VBA code if everything is derived from the intrinsic Application >> > object. >> >> > 3. Outlook COM adddin where the application object passed in OnConnection is >> > used to derive everything. >> >> > "DISMfish" <DISMf***@gmail.com> wrote in message >> >news:1191435313.685330.26500@n39g2000hsh.googlegroups.com... >> > <snip> >> >> Yeah, I've read that page over and over again. I don't understand why >> >> this has worked for other ppl. What's makes this "out of process" >> >> code?- Hide quoted text - >> >> - Show quoted text - > > Thanks for the responses. I check the About Outlook and the "Security > Mode" is set to "Default". >
Show quote
On Oct 4, 3:58 pm, "Sue Mosher [MVP-Outlook]" <sue***@outlookcode.com> I get the security prompt.wrote: > Your ItemSend code is in the built-in ThisOutlookSession module, right? What happens if you replace it with this: > > Private Sub Application_ItemSend(ByVal Item As Object, Cancel As Boolean) > Debug.Print Left(Item.Body, 50) > End Sub > > Do you get a security prompt? > -- > Sue Mosher, Outlook MVP > Author of Microsoft Outlook 2007 Programming: > Jumpstart for Power Users and Administrators > http://www.outlookcode.com/article.aspx?id=54 > > > > "AgapeDisciple" <AgapeDisci***@gmail.com> wrote in messagenews:1191524527.003029.274***@n39g2000hsh.googlegroups.com... > > On Oct 3, 7:16 pm, "Sue Mosher [MVP-Outlook]" <sue***@outlookcode.com> > > wrote: > >> And, if your code fits one of those scenarios but still throws security prompts, look on the Help | About Microsoft Outlook dialog. If it says Security Mode: Administrator Controlled, that means that it's up to the network administrator to determine which add-ins (#3 on Ken's list) and which methods and properties (for #1-3) won't trigger prompts. > > >> "Ken Slovak - [MVP - Outlook]" <kenslo***@mvps.org> wrote in messagenews:u%23RAN5gBIHA.1***@TK2MSFTNGP02.phx.gbl... > > >> > In-process trusted code for Outlook 2003 runs as: > > >> > 1. Outlook form code if all objects are derived from the intrinsic > >> > Application and Item objects. > > >> > 2. Outlook VBA code if everything is derived from the intrinsic Application > >> > object. > > >> > 3. Outlook COM adddin where the application object passed in OnConnection is > >> > used to derive everything. > > >> > "DISMfish" <DISMf***@gmail.com> wrote in message > >> >news:1191435313.685330.26500@n39g2000hsh.googlegroups.com... > >> > <snip> > >> >> Yeah, I've read that page over and over again. I don't understand why > >> >> this has worked for other ppl. What's makes this "out of process" > >> >> code?- Hide quoted text - > > >> - Show quoted text - > > > Thanks for the responses. I check the About Outlook and the "Security > > Mode" is set to "Default".- Hide quoted text - > > - Show quoted text - Either you're not running Outlook 2003 or there is something terribly wrong with your installation or there's something important omitted in your description of your VBA code. The procedure I gave, when placed in the ThisOutlookSession module, should not raise security prompts in a normal standalone Outlook 2003 installation.
-- Show quoteSue Mosher, Outlook MVP Author of Microsoft Outlook 2007 Programming: Jumpstart for Power Users and Administrators http://www.outlookcode.com/article.aspx?id=54 "AgapeDisciple" <AgapeDisci***@gmail.com> wrote in message news:1191529474.088630.300830@k79g2000hse.googlegroups.com... > On Oct 4, 3:58 pm, "Sue Mosher [MVP-Outlook]" <sue***@outlookcode.com> > wrote: >> Your ItemSend code is in the built-in ThisOutlookSession module, right? What happens if you replace it with this: >> >> Private Sub Application_ItemSend(ByVal Item As Object, Cancel As Boolean) >> Debug.Print Left(Item.Body, 50) >> End Sub >> >> Do you get a security prompt? >> >> "AgapeDisciple" <AgapeDisci***@gmail.com> wrote in messagenews:1191524527.003029.274***@n39g2000hsh.googlegroups.com... >> > On Oct 3, 7:16 pm, "Sue Mosher [MVP-Outlook]" <sue***@outlookcode.com> >> > wrote: >> >> And, if your code fits one of those scenarios but still throws security prompts, look on the Help | About Microsoft Outlook dialog. If it says Security Mode: Administrator Controlled, that means that it's up to the network administrator to determine which add-ins (#3 on Ken's list) and which methods and properties (for #1-3) won't trigger prompts. >> >> >> "Ken Slovak - [MVP - Outlook]" <kenslo***@mvps.org> wrote in messagenews:u%23RAN5gBIHA.1***@TK2MSFTNGP02.phx.gbl... >> >> >> > In-process trusted code for Outlook 2003 runs as: >> >> >> > 1. Outlook form code if all objects are derived from the intrinsic >> >> > Application and Item objects. >> >> >> > 2. Outlook VBA code if everything is derived from the intrinsic Application >> >> > object. >> >> >> > 3. Outlook COM adddin where the application object passed in OnConnection is >> >> > used to derive everything. >> >> >> > "DISMfish" <DISMf***@gmail.com> wrote in message >> >> >news:1191435313.685330.26500@n39g2000hsh.googlegroups.com... >> >> > <snip> >> >> >> Yeah, I've read that page over and over again. I don't understand why >> >> >> this has worked for other ppl. What's makes this "out of process" >> >> >> code?- Hide quoted text - >> >> >> - Show quoted text - >> >> > Thanks for the responses. I check the About Outlook and the "Security >> > Mode" is set to "Default".- Hide quoted text - >> >> - Show quoted text - > > I get the security prompt. >
Show quote
On Oct 4, 4:31 pm, "Sue Mosher [MVP-Outlook]" <sue***@outlookcode.com> I'm not sure what's going on. I pasted it verbatim to your post andwrote: > Either you're not running Outlook 2003 or there is something terribly wrong with your installation or there's something important omitted in your description of your VBA code. The procedure I gave, when placed in the ThisOutlookSession module, should not raise security prompts in a normal standalone Outlook 2003 installation. > > -- > Sue Mosher, Outlook MVP > Author of Microsoft Outlook 2007 Programming: > Jumpstart for Power Users and Administrators > http://www.outlookcode.com/article.aspx?id=54 > > > > "AgapeDisciple" <AgapeDisci***@gmail.com> wrote in messagenews:1191529474.088630.300***@k79g2000hse.googlegroups.com... > > On Oct 4, 3:58 pm, "Sue Mosher [MVP-Outlook]" <sue***@outlookcode.com> > > wrote: > >> Your ItemSend code is in the built-in ThisOutlookSession module, right? What happens if you replace it with this: > > >> Private Sub Application_ItemSend(ByVal Item As Object, Cancel As Boolean) > >> Debug.Print Left(Item.Body, 50) > >> End Sub > > >> Do you get a security prompt? > > >> "AgapeDisciple" <AgapeDisci***@gmail.com> wrote in messagenews:1191524527.003029.274***@n39g2000hsh.googlegroups.com... > >> > On Oct 3, 7:16 pm, "Sue Mosher [MVP-Outlook]" <sue***@outlookcode.com> > >> > wrote: > >> >> And, if your code fits one of those scenarios but still throws security prompts, look on the Help | About Microsoft Outlook dialog. If it says Security Mode: Administrator Controlled, that means that it's up to the network administrator to determine which add-ins (#3 on Ken's list) and which methods and properties (for #1-3) won't trigger prompts. > > >> >> "Ken Slovak - [MVP - Outlook]" <kenslo***@mvps.org> wrote in messagenews:u%23RAN5gBIHA.1***@TK2MSFTNGP02.phx.gbl... > > >> >> > In-process trusted code for Outlook 2003 runs as: > > >> >> > 1. Outlook form code if all objects are derived from the intrinsic > >> >> > Application and Item objects. > > >> >> > 2. Outlook VBA code if everything is derived from the intrinsic Application > >> >> > object. > > >> >> > 3. Outlook COM adddin where the application object passed in OnConnection is > >> >> > used to derive everything. > > >> >> > "DISMfish" <DISMf***@gmail.com> wrote in message > >> >> >news:1191435313.685330.26500@n39g2000hsh.googlegroups.com... > >> >> > <snip> > >> >> >> Yeah, I've read that page over and over again. I don't understand why > >> >> >> this has worked for other ppl. What's makes this "out of process" > >> >> >> code?- Hide quoted text - > > >> >> - Show quoted text - > > >> > Thanks for the responses. I check the About Outlook and the "Security > >> > Mode" is set to "Default".- Hide quoted text - > > >> - Show quoted text - > > > I get the security prompt.- Hide quoted text - > > - Show quoted text - got the security dialog. We do use a MS Exchange server and here is the version info from the About screen: http://bp2.blogger.com/_-up1D8EYb7Q/RwY7kJ0-wUI/AAAAAAAAACE/xaqLl5SjAjU/s400/AboutOL.png Also, from the link that Ken provided, at the bottom of the "Object model guard" section it states that the Debug.Print command should raise the security box when accessing a "blocked" command... right? > the Debug.Print command should Yes, if the code is not "trusted" in the way we've been discussing, you would expect to get a security prompt. > raise the security box when accessing a "blocked" command... right? At this point, I would suggest that you export all your VBA code, exit Outlook, and rename the VbaProject.OTM file, then restart Outlook. That will give you a new, clean VBA code file that you can start over with, eliminating the possibility that the original one was corrupted in some way as to cause security prompts to occur (something I've never heard of, BTW). -- Show quoteSue Mosher, Outlook MVP Author of Microsoft Outlook 2007 Programming: Jumpstart for Power Users and Administrators http://www.outlookcode.com/article.aspx?id=54 "AgapeDisciple" <AgapeDisci***@gmail.com> wrote in message news:1191590876.463095.65240@g4g2000hsf.googlegroups.com... > On Oct 4, 4:31 pm, "Sue Mosher [MVP-Outlook]" <sue***@outlookcode.com> > wrote: >> Either you're not running Outlook 2003 or there is something terribly wrong with your installation or there's something important omitted in your description of your VBA code. The procedure I gave, when placed in the ThisOutlookSession module, should not raise security prompts in a normal standalone Outlook 2003 installation. >> >> "AgapeDisciple" <AgapeDisci***@gmail.com> wrote in messagenews:1191529474.088630.300***@k79g2000hse.googlegroups.com... >> > On Oct 4, 3:58 pm, "Sue Mosher [MVP-Outlook]" <sue***@outlookcode.com> >> > wrote: >> >> Your ItemSend code is in the built-in ThisOutlookSession module, right? What happens if you replace it with this: >> >> >> Private Sub Application_ItemSend(ByVal Item As Object, Cancel As Boolean) >> >> Debug.Print Left(Item.Body, 50) >> >> End Sub >> >> >> Do you get a security prompt? >> >> >> "AgapeDisciple" <AgapeDisci***@gmail.com> wrote in messagenews:1191524527.003029.274***@n39g2000hsh.googlegroups.com... >> >> > On Oct 3, 7:16 pm, "Sue Mosher [MVP-Outlook]" <sue***@outlookcode.com> >> >> > wrote: >> >> >> And, if your code fits one of those scenarios but still throws security prompts, look on the Help | About Microsoft Outlook dialog. If it says Security Mode: Administrator Controlled, that means that it's up to the network administrator to determine which add-ins (#3 on Ken's list) and which methods and properties (for #1-3) won't trigger prompts. >> >> >> >> "Ken Slovak - [MVP - Outlook]" <kenslo***@mvps.org> wrote in messagenews:u%23RAN5gBIHA.1***@TK2MSFTNGP02.phx.gbl... >> >> >> >> > In-process trusted code for Outlook 2003 runs as: >> >> >> >> > 1. Outlook form code if all objects are derived from the intrinsic >> >> >> > Application and Item objects. >> >> >> >> > 2. Outlook VBA code if everything is derived from the intrinsic Application >> >> >> > object. >> >> >> >> > 3. Outlook COM adddin where the application object passed in OnConnection is >> >> >> > used to derive everything. >> >> >> >> > "DISMfish" <DISMf***@gmail.com> wrote in message >> >> >> >news:1191435313.685330.26500@n39g2000hsh.googlegroups.com... >> >> >> > <snip> >> >> >> >> Yeah, I've read that page over and over again. I don't understand why >> >> >> >> this has worked for other ppl. What's makes this "out of process" >> >> >> >> code?- Hide quoted text - >> >> >> >> - Show quoted text - >> >> >> > Thanks for the responses. I check the About Outlook and the "Security >> >> > Mode" is set to "Default". >> >> > I get the security prompt.- > > I'm not sure what's going on. I pasted it verbatim to your post and > got the security dialog. We do use a MS Exchange server and here is > the version info from the About screen: > http://bp2.blogger.com/_-up1D8EYb7Q/RwY7kJ0-wUI/AAAAAAAAACE/xaqLl5SjAjU/s400/AboutOL.png > > Also, from the link that Ken provided, at the bottom of the "Object > model guard" section it states that the Debug.Print command should > raise the security box when accessing a "blocked" command... right? > On Oct 5, 10:00 am, "Sue Mosher [MVP-Outlook]"
<sue***@outlookcode.com> wrote: Show quote > > the Debug.Print command should Ok, I followed what you suggested so that I have an empty> > raise the security box when accessing a "blocked" command... right? > > Yes, if the code is not "trusted" in the way we've been discussing, you would expect to get a security prompt. > > At this point, I would suggest that you export all your VBA code, exit Outlook, and rename the VbaProject.OTM file, then restart Outlook. That will give you a new, clean VBA code file that you can start over with, eliminating the possibility that the original one was corrupted in some way as to cause security prompts to occur (something I've never heard of, BTW). > > -- > Sue Mosher, Outlook MVP > Author of Microsoft Outlook 2007 Programming: > Jumpstart for Power Users and Administrators > http://www.outlookcode.com/article.aspx?id=54 > > > > "AgapeDisciple" <AgapeDisci***@gmail.com> wrote in messagenews:1191590876.463095.65***@g4g2000hsf.googlegroups.com... > > On Oct 4, 4:31 pm, "Sue Mosher [MVP-Outlook]" <sue***@outlookcode.com> > > wrote: > >> Either you're not running Outlook 2003 or there is something terribly wrong with your installation or there's something important omitted in your description of your VBA code. The procedure I gave, when placed in the ThisOutlookSession module, should not raise security prompts in a normal standalone Outlook 2003 installation. > > >> "AgapeDisciple" <AgapeDisci***@gmail.com> wrote in messagenews:1191529474.088630.300***@k79g2000hse.googlegroups.com... > >> > On Oct 4, 3:58 pm, "Sue Mosher [MVP-Outlook]" <sue***@outlookcode.com> > >> > wrote: > >> >> Your ItemSend code is in the built-in ThisOutlookSession module, right? What happens if you replace it with this: > > >> >> Private Sub Application_ItemSend(ByVal Item As Object, Cancel As Boolean) > >> >> Debug.Print Left(Item.Body, 50) > >> >> End Sub > > >> >> Do you get a security prompt? > > >> >> "AgapeDisciple" <AgapeDisci***@gmail.com> wrote in messagenews:1191524527.003029.274***@n39g2000hsh.googlegroups.com... > >> >> > On Oct 3, 7:16 pm, "Sue Mosher [MVP-Outlook]" <sue***@outlookcode.com> > >> >> > wrote: > >> >> >> And, if your code fits one of those scenarios but still throws security prompts, look on the Help | About Microsoft Outlook dialog. If it says Security Mode: Administrator Controlled, that means that it's up to the network administrator to determine which add-ins (#3 on Ken's list) and which methods and properties (for #1-3) won't trigger prompts. > > >> >> >> "Ken Slovak - [MVP - Outlook]" <kenslo***@mvps.org> wrote in messagenews:u%23RAN5gBIHA.1***@TK2MSFTNGP02.phx.gbl... > > >> >> >> > In-process trusted code for Outlook 2003 runs as: > > >> >> >> > 1. Outlook form code if all objects are derived from the intrinsic > >> >> >> > Application and Item objects. > > >> >> >> > 2. Outlook VBA code if everything is derived from the intrinsic Application > >> >> >> > object. > > >> >> >> > 3. Outlook COM adddin where the application object passed in OnConnection is > >> >> >> > used to derive everything. > > >> >> >> > "DISMfish" <DISMf***@gmail.com> wrote in message > >> >> >> >news:1191435313.685330.26500@n39g2000hsh.googlegroups.com... > >> >> >> > <snip> > >> >> >> >> Yeah, I've read that page over and over again. I don't understand why > >> >> >> >> this has worked for other ppl. What's makes this "out of process" > >> >> >> >> code?- Hide quoted text - > > >> >> >> - Show quoted text - > > >> >> > Thanks for the responses. I check the About Outlook and the "Security > >> >> > Mode" is set to "Default". > > >> > I get the security prompt.- > > > I'm not sure what's going on. I pasted it verbatim to your post and > > got the security dialog. We do use a MS Exchange server and here is > > the version info from the About screen: > >http://bp2.blogger.com/_-up1D8EYb7Q/RwY7kJ0-wUI/AAAAAAAAACE/xaqLl5SjA... > > > Also, from the link that Ken provided, at the bottom of the "Object > > model guard" section it states that the Debug.Print command should > > raise the security box when accessing a "blocked" command... right?- Hide quoted text - > > - Show quoted text - VbaProject.OTM file. I still get the security prompt... :-( And the code is in the ThisOutlookSession module in Outlook VBA? If so, I'm out of ideas. This is a scenario I have never seen since Outlook 2003 was released.
-- Show quoteSue Mosher, Outlook MVP Author of Microsoft Outlook 2007 Programming: Jumpstart for Power Users and Administrators http://www.outlookcode.com/article.aspx?id=54 "AgapeDisciple" <AgapeDisci***@gmail.com> wrote in message news:1191610699.515743.220600@d55g2000hsg.googlegroups.com... > On Oct 5, 10:00 am, "Sue Mosher [MVP-Outlook]" > <sue***@outlookcode.com> wrote: >> > the Debug.Print command should >> > raise the security box when accessing a "blocked" command... right? >> >> Yes, if the code is not "trusted" in the way we've been discussing, you would expect to get a security prompt. >> >> At this point, I would suggest that you export all your VBA code, exit Outlook, and rename the VbaProject.OTM file, then restart Outlook. That will give you a new, clean VBA code file that you can start over with, eliminating the possibility that the original one was corrupted in some way as to cause security prompts to occur (something I've never heard of, BTW). >> >> -- >> Sue Mosher, Outlook MVP >> Author of Microsoft Outlook 2007 Programming: >> Jumpstart for Power Users and Administrators >> http://www.outlookcode.com/article.aspx?id=54 >> >> >> >> "AgapeDisciple" <AgapeDisci***@gmail.com> wrote in messagenews:1191590876.463095.65***@g4g2000hsf.googlegroups.com... >> > On Oct 4, 4:31 pm, "Sue Mosher [MVP-Outlook]" <sue***@outlookcode.com> >> > wrote: >> >> Either you're not running Outlook 2003 or there is something terribly wrong with your installation or there's something important omitted in your description of your VBA code. The procedure I gave, when placed in the ThisOutlookSession module, should not raise security prompts in a normal standalone Outlook 2003 installation. >> >> >> "AgapeDisciple" <AgapeDisci***@gmail.com> wrote in messagenews:1191529474.088630.300***@k79g2000hse.googlegroups.com... >> >> > On Oct 4, 3:58 pm, "Sue Mosher [MVP-Outlook]" <sue***@outlookcode.com> >> >> > wrote: >> >> >> Your ItemSend code is in the built-in ThisOutlookSession module, right? What happens if you replace it with this: >> >> >> >> Private Sub Application_ItemSend(ByVal Item As Object, Cancel As Boolean) >> >> >> Debug.Print Left(Item.Body, 50) >> >> >> End Sub >> >> >> >> Do you get a security prompt? >> >> >> >> "AgapeDisciple" <AgapeDisci***@gmail.com> wrote in messagenews:1191524527.003029.274***@n39g2000hsh.googlegroups.com... >> >> >> > On Oct 3, 7:16 pm, "Sue Mosher [MVP-Outlook]" <sue***@outlookcode.com> >> >> >> > wrote: >> >> >> >> And, if your code fits one of those scenarios but still throws security prompts, look on the Help | About Microsoft Outlook dialog. If it says Security Mode: Administrator Controlled, that means that it's up to the network administrator to determine which add-ins (#3 on Ken's list) and which methods and properties (for #1-3) won't trigger prompts. >> >> >> >> >> "Ken Slovak - [MVP - Outlook]" <kenslo***@mvps.org> wrote in messagenews:u%23RAN5gBIHA.1***@TK2MSFTNGP02.phx.gbl... >> >> >> >> >> > In-process trusted code for Outlook 2003 runs as: >> >> >> >> >> > 1. Outlook form code if all objects are derived from the intrinsic >> >> >> >> > Application and Item objects. >> >> >> >> >> > 2. Outlook VBA code if everything is derived from the intrinsic Application >> >> >> >> > object. >> >> >> >> >> > 3. Outlook COM adddin where the application object passed in OnConnection is >> >> >> >> > used to derive everything. >> >> >> >> >> > "DISMfish" <DISMf***@gmail.com> wrote in message >> >> >> >> >news:1191435313.685330.26500@n39g2000hsh.googlegroups.com... >> >> >> >> > <snip> >> >> >> >> >> Yeah, I've read that page over and over again. I don't understand why >> >> >> >> >> this has worked for other ppl. What's makes this "out of process" >> >> >> >> >> code?- Hide quoted text - >> >> >> >> >> - Show quoted text - >> >> >> >> > Thanks for the responses. I check the About Outlook and the "Security >> >> >> > Mode" is set to "Default". >> >> >> > I get the security prompt.- >> >> > I'm not sure what's going on. I pasted it verbatim to your post and >> > got the security dialog. We do use a MS Exchange server and here is >> > the version info from the About screen: >> >http://bp2.blogger.com/_-up1D8EYb7Q/RwY7kJ0-wUI/AAAAAAAAACE/xaqLl5SjA... >> >> > Also, from the link that Ken provided, at the bottom of the "Object >> > model guard" section it states that the Debug.Print command should >> > raise the security box when accessing a "blocked" command... right?- Hide quoted text - >> >> - Show quoted text - > > Ok, I followed what you suggested so that I have an empty > VbaProject.OTM file. I still get the security prompt... :-( >
Show quote
On Oct 5, 3:54 pm, "Sue Mosher [MVP-Outlook]" <sue***@outlookcode.com> Sorry it took so long to get back, but yes I did put it in thewrote: > And the code is in the ThisOutlookSession module in Outlook VBA? If so, I'm out of ideas. This is a scenario I have never seen since Outlook 2003 was released. > > -- > Sue Mosher, Outlook MVP > Author of Microsoft Outlook 2007 Programming: > Jumpstart for Power Users and Administrators > http://www.outlookcode.com/article.aspx?id=54 > > > > "AgapeDisciple" <AgapeDisci***@gmail.com> wrote in messagenews:1191610699.515743.220***@d55g2000hsg.googlegroups.com... > > On Oct 5, 10:00 am, "Sue Mosher [MVP-Outlook]" > > <sue***@outlookcode.com> wrote: > >> > the Debug.Print command should > >> > raise the security box when accessing a "blocked" command... right? > > >> Yes, if the code is not "trusted" in the way we've been discussing, you would expect to get a security prompt. > > >> At this point, I would suggest that you export all your VBA code, exit Outlook, and rename the VbaProject.OTM file, then restart Outlook. That will give you a new, clean VBA code file that you can start over with, eliminating the possibility that the original one was corrupted in some way as to cause security prompts to occur (something I've never heard of, BTW). > > >> -- > >> Sue Mosher, Outlook MVP > >> Author of Microsoft Outlook 2007 Programming: > >> Jumpstart for Power Users and Administrators > >> http://www.outlookcode.com/article.aspx?id=54 > > >> "AgapeDisciple" <AgapeDisci***@gmail.com> wrote in messagenews:1191590876.463095.65***@g4g2000hsf.googlegroups.com... > >> > On Oct 4, 4:31 pm, "Sue Mosher [MVP-Outlook]" <sue***@outlookcode.com> > >> > wrote: > >> >> Either you're not running Outlook 2003 or there is something terribly wrong with your installation or there's something important omitted in your description of your VBA code. The procedure I gave, when placed in the ThisOutlookSession module, should not raise security prompts in a normal standalone Outlook 2003 installation. > > >> >> "AgapeDisciple" <AgapeDisci***@gmail.com> wrote in messagenews:1191529474.088630.300***@k79g2000hse.googlegroups.com... > >> >> > On Oct 4, 3:58 pm, "Sue Mosher [MVP-Outlook]" <sue***@outlookcode.com> > >> >> > wrote: > >> >> >> Your ItemSend code is in the built-in ThisOutlookSession module, right? What happens if you replace it with this: > > >> >> >> Private Sub Application_ItemSend(ByVal Item As Object, Cancel As Boolean) > >> >> >> Debug.Print Left(Item.Body, 50) > >> >> >> End Sub > > >> >> >> Do you get a security prompt? > > >> >> >> "AgapeDisciple" <AgapeDisci***@gmail.com> wrote in messagenews:1191524527.003029.274***@n39g2000hsh.googlegroups.com... > >> >> >> > On Oct 3, 7:16 pm, "Sue Mosher [MVP-Outlook]" <sue***@outlookcode.com> > >> >> >> > wrote: > >> >> >> >> And, if your code fits one of those scenarios but still throws security prompts, look on the Help | About Microsoft Outlook dialog. If it says Security Mode: Administrator Controlled, that means that it's up to the network administrator to determine which add-ins (#3 on Ken's list) and which methods and properties (for #1-3) won't trigger prompts. > > >> >> >> >> "Ken Slovak - [MVP - Outlook]" <kenslo***@mvps.org> wrote in messagenews:u%23RAN5gBIHA.1***@TK2MSFTNGP02.phx.gbl... > > >> >> >> >> > In-process trusted code for Outlook 2003 runs as: > > >> >> >> >> > 1. Outlook form code if all objects are derived from the intrinsic > >> >> >> >> > Application and Item objects. > > >> >> >> >> > 2. Outlook VBA code if everything is derived from the intrinsic Application > >> >> >> >> > object. > > >> >> >> >> > 3. Outlook COM adddin where the application object passed in OnConnection is > >> >> >> >> > used to derive everything. > > >> >> >> >> > "DISMfish" <DISMf***@gmail.com> wrote in message > >> >> >> >> >news:1191435313.685330.26500@n39g2000hsh.googlegroups.com... > >> >> >> >> > <snip> > >> >> >> >> >> Yeah, I've read that page over and over again. I don't understand why > >> >> >> >> >> this has worked for other ppl. What's makes this "out of process" > >> >> >> >> >> code?- Hide quoted text - > > >> >> >> >> - Show quoted text - > > >> >> >> > Thanks for the responses. I check the About Outlook and the "Security > >> >> >> > Mode" is set to "Default". > > >> >> > I get the security prompt.- > > >> > I'm not sure what's going on. I pasted it verbatim to your post and > >> > got the security dialog. We do use a MS Exchange server and here is > >> > the version info from the About screen: > >> >http://bp2.blogger.com/_-up1D8EYb7Q/RwY7kJ0-wUI/AAAAAAAAACE/xaqLl5SjA... > > >> > Also, from the link that Ken provided, at the bottom of the "Object > >> > model guard" section it states that the Debug.Print command should > >> > raise the security box when accessing a "blocked" command... right?- Hide quoted text - > > >> - Show quoted text - > > > Ok, I followed what you suggested so that I have an empty > > VbaProject.OTM file. I still get the security prompt... :-(- Hide quoted text - > > - Show quoted text - ThisOutlookSession module in Outlook VBA. Do you know anywhere else I can check to see if an option has been enabled so that the security dialog appears for this? BTW, I don't get the security dialog for the Subject line. Thanks! > Do you know anywhere else I Outlook 2003 has no simple end-user option to turn the object model prompts on and off. > can check to see if an option has been enabled so that the security > dialog appears for this? Look in the Windows registry for keys named HKCU\Software\Microsoft\Security and HKCU\Policies\Software\Microsoft\Security. Report back on any values you find for CheckAdminSettings and AddinTrust. Have you run Help | Detect and Repair? > BTW, I don't get the security dialog for the Subject line. Perfectly normal. Subject is not a blocked property. -- Show quoteSue Mosher, Outlook MVP Author of Microsoft Outlook 2007 Programming: Jumpstart for Power Users and Administrators http://www.outlookcode.com/article.aspx?id=54 "AgapeDisciple" <AgapeDisci***@gmail.com> wrote in message news:1191961205.616988.280820@o3g2000hsb.googlegroups.com... > On Oct 5, 3:54 pm, "Sue Mosher [MVP-Outlook]" <sue***@outlookcode.com> > wrote: >> And the code is in the ThisOutlookSession module in Outlook VBA? If so, I'm out of ideas. This is a scenario I have never seen since Outlook 2003 was released. > >> >> "AgapeDisciple" <AgapeDisci***@gmail.com> wrote in messagenews:1191610699.515743.220***@d55g2000hsg.googlegroups.com... >> > On Oct 5, 10:00 am, "Sue Mosher [MVP-Outlook]" >> > <sue***@outlookcode.com> wrote: >> >> > the Debug.Print command should >> >> > raise the security box when accessing a "blocked" command... right? >> >> >> Yes, if the code is not "trusted" in the way we've been discussing, you would expect to get a security prompt. >> >> >> At this point, I would suggest that you export all your VBA code, exit Outlook, and rename the VbaProject.OTM file, then restart Outlook. That will give you a new, clean VBA code file that you can start over with, eliminating the possibility that the original one was corrupted in some way as to cause security prompts to occur (something I've never heard of, BTW). >> >> >> "AgapeDisciple" <AgapeDisci***@gmail.com> wrote in messagenews:1191590876.463095.65***@g4g2000hsf.googlegroups.com... >> >> > On Oct 4, 4:31 pm, "Sue Mosher [MVP-Outlook]" <sue***@outlookcode.com> >> >> > wrote: >> >> >> Either you're not running Outlook 2003 or there is something terribly wrong with your installation or there's something important omitted in your description of your VBA code. The procedure I gave, when placed in the ThisOutlookSession module, should not raise security prompts in a normal standalone Outlook 2003 installation. >> >> >> >> "AgapeDisciple" <AgapeDisci***@gmail.com> wrote in messagenews:1191529474.088630.300***@k79g2000hse.googlegroups.com... >> >> >> > On Oct 4, 3:58 pm, "Sue Mosher [MVP-Outlook]" <sue***@outlookcode.com> >> >> >> > wrote: >> >> >> >> Your ItemSend code is in the built-in ThisOutlookSession module, right? What happens if you replace it with this: >> >> >> >> >> Private Sub Application_ItemSend(ByVal Item As Object, Cancel As Boolean) >> >> >> >> Debug.Print Left(Item.Body, 50) >> >> >> >> End Sub >> >> >> >> >> Do you get a security prompt? >> >> >> >> >> "AgapeDisciple" <AgapeDisci***@gmail.com> wrote in messagenews:1191524527.003029.274***@n39g2000hsh.googlegroups.com... >> >> >> >> > On Oct 3, 7:16 pm, "Sue Mosher [MVP-Outlook]" <sue***@outlookcode.com> >> >> >> >> > wrote: >> >> >> >> >> And, if your code fits one of those scenarios but still throws security prompts, look on the Help | About Microsoft Outlook dialog. If it says Security Mode: Administrator Controlled, that means that it's up to the network administrator to determine which add-ins (#3 on Ken's list) and which methods and properties (for #1-3) won't trigger prompts. >> >> >> >> >> >> "Ken Slovak - [MVP - Outlook]" <kenslo***@mvps.org> wrote in messagenews:u%23RAN5gBIHA.1***@TK2MSFTNGP02.phx.gbl... >> >> >> >> >> >> > In-process trusted code for Outlook 2003 runs as: >> >> >> >> >> >> > 1. Outlook form code if all objects are derived from the intrinsic >> >> >> >> >> > Application and Item objects. >> >> >> >> >> >> > 2. Outlook VBA code if everything is derived from the intrinsic Application >> >> >> >> >> > object. >> >> >> >> >> >> > 3. Outlook COM adddin where the application object passed in OnConnection is >> >> >> >> >> > used to derive everything. >> >> >> >> >> >> > "DISMfish" <DISMf***@gmail.com> wrote in message >> >> >> >> >> >news:1191435313.685330.26500@n39g2000hsh.googlegroups.com... >> >> >> >> >> > <snip> >> >> >> >> >> >> Yeah, I've read that page over and over again. I don't understand why >> >> >> >> >> >> this has worked for other ppl. What's makes this "out of process" >> >> >> >> >> >> code?- Hide quoted text - >> >> >> >> >> >> - Show quoted text - >> >> >> >> >> > Thanks for the responses. I check the About Outlook and the "Security >> >> >> >> > Mode" is set to "Default". >> >> >> >> > I get the security prompt.- >> >> >> > I'm not sure what's going on. I pasted it verbatim to your post and >> >> > got the security dialog. We do use a MS Exchange server and here is >> >> > the version info from the About screen: >> >> >http://bp2.blogger.com/_-up1D8EYb7Q/RwY7kJ0-wUI/AAAAAAAAACE/xaqLl5SjA... >> >> >> > Also, from the link that Ken provided, at the bottom of the "Object >> >> > model guard" section it states that the Debug.Print command should >> >> > raise the security box when accessing a "blocked" command... right >> >> > Ok, I followed what you suggested so that I have an empty >> > VbaProject.OTM file. I still get the security prompt... :-( > Sorry it took so long to get back, but yes I did put it in the > ThisOutlookSession module in Outlook VBA. Do you know anywhere else I > can check to see if an option has been enabled so that the security > dialog appears for this? > > BTW, I don't get the security dialog for the Subject line. > > Thanks! > |
|||||||||||||||||||||||