Home |
Search |
Today's Posts |
|
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Programmatically preventing macros issues
I'm writing an automation project which involves extracting data from ss
we receive from a bewildering number of sources, and we're afraid of the possibility that my app may trigger a malicious macro. I understand that I've got to set the AutomationSecurity value to 3, but I've still got a few questions. First: The tools-macros-security tab has 4 values; why can I only set the AutomationSecurity value to 1, 2 or 3 (ie only 3 possible values)? Second: If I set AutomationSecurity to 3 and, since we plan to disable user interaction with excel while my app is running by making excel invisible, is there any possibility that a macro (or anything else) could trigger a dialog requiring user input & resulting in an apparent hang? If yes, will DisplayAlerts = false take care of this? Please bear in mind that the only thing we're doing (as of now anyway) is pulling values out of cells, not anything that I see as requiring interaction. Other suggestions or things to watch out for? TIA! -- -Lew The workers took the robot for Maria. |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Programmatically preventing macros issues
If I am understand your problem correctly...
Have you tried assigning a personal digital certtificate to your project file/VBA application and setting the macro level to High in Excel? Microsoft office allows you to make digital certificates for just that purpose - so you can be prompted before you accept running a macro from an untrusted source only once (trust those you want - discard those you don't - in this case you will be trusting your file and disgarding the data source macros without the hassle of being prompted). To make a certificate: Start Microsoft Office Office Tools Digital Certificates for VBA Projects To apply it to your project file: In your VBA editor under tools Digital Signature ....I think this is what you were asking and is one way to go about trying to work around security. Good Luck. -Eric On Sat, 7 Oct 2006 08:45:20 -0400, "Lew" wrote: I'm writing an automation project which involves extracting data from ss we receive from a bewildering number of sources, and we're afraid of the possibility that my app may trigger a malicious macro. I understand that I've got to set the AutomationSecurity value to 3, but I've still got a few questions. First: The tools-macros-security tab has 4 values; why can I only set the AutomationSecurity value to 1, 2 or 3 (ie only 3 possible values)? Second: If I set AutomationSecurity to 3 and, since we plan to disable user interaction with excel while my app is running by making excel invisible, is there any possibility that a macro (or anything else) could trigger a dialog requiring user input & resulting in an apparent hang? If yes, will DisplayAlerts = false take care of this? Please bear in mind that the only thing we're doing (as of now anyway) is pulling values out of cells, not anything that I see as requiring interaction. Other suggestions or things to watch out for? TIA! |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Programmatically preventing macros issues
Thanks, Eric:
No, we're automating data extraction into corporate data stores. The dev platform is Visual FoxPro and we're not running any macros. Sorry if I wasn't clear enough. -Lew "Eric Lachowitz" wrote in message ... If I am understand your problem correctly... Have you tried assigning a personal digital certtificate to your project file/VBA application and setting the macro level to High in Excel? Microsoft office allows you to make digital certificates for just that purpose - so you can be prompted before you accept running a macro from an untrusted source only once (trust those you want - discard those you don't - in this case you will be trusting your file and disgarding the data source macros without the hassle of being prompted). To make a certificate: Start Microsoft Office Office Tools Digital Certificates for VBA Projects To apply it to your project file: In your VBA editor under tools Digital Signature ...I think this is what you were asking and is one way to go about trying to work around security. Good Luck. -Eric On Sat, 7 Oct 2006 08:45:20 -0400, "Lew" wrote: I'm writing an automation project which involves extracting data from ss we receive from a bewildering number of sources, and we're afraid of the possibility that my app may trigger a malicious macro. I understand that I've got to set the AutomationSecurity value to 3, but I've still got a few questions. First: The tools-macros-security tab has 4 values; why can I only set the AutomationSecurity value to 1, 2 or 3 (ie only 3 possible values)? Second: If I set AutomationSecurity to 3 and, since we plan to disable user interaction with excel while my app is running by making excel invisible, is there any possibility that a macro (or anything else) could trigger a dialog requiring user input & resulting in an apparent hang? If yes, will DisplayAlerts = false take care of this? Please bear in mind that the only thing we're doing (as of now anyway) is pulling values out of cells, not anything that I see as requiring interaction. Other suggestions or things to watch out for? TIA! |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Programmatically preventing macros issues
Eric in which version of Office was this introduced?
TIA "Eric Lachowitz" wrote: If I am understand your problem correctly... Have you tried assigning a personal digital certtificate to your project file/VBA application and setting the macro level to High in Excel? Microsoft office allows you to make digital certificates for just that purpose - so you can be prompted before you accept running a macro from an untrusted source only once (trust those you want - discard those you don't - in this case you will be trusting your file and disgarding the data source macros without the hassle of being prompted). To make a certificate: Start Microsoft Office Office Tools Digital Certificates for VBA Projects To apply it to your project file: In your VBA editor under tools Digital Signature ....I think this is what you were asking and is one way to go about trying to work around security. Good Luck. -Eric On Sat, 7 Oct 2006 08:45:20 -0400, "Lew" wrote: I'm writing an automation project which involves extracting data from ss we receive from a bewildering number of sources, and we're afraid of the possibility that my app may trigger a malicious macro. I understand that I've got to set the AutomationSecurity value to 3, but I've still got a few questions. First: The tools-macros-security tab has 4 values; why can I only set the AutomationSecurity value to 1, 2 or 3 (ie only 3 possible values)? Second: If I set AutomationSecurity to 3 and, since we plan to disable user interaction with excel while my app is running by making excel invisible, is there any possibility that a macro (or anything else) could trigger a dialog requiring user input & resulting in an apparent hang? If yes, will DisplayAlerts = false take care of this? Please bear in mind that the only thing we're doing (as of now anyway) is pulling values out of cells, not anything that I see as requiring interaction. Other suggestions or things to watch out for? TIA! |
#5
Posted to microsoft.public.excel.programming
|
|||
|
|||
Programmatically preventing macros issues
I am unsure as to when... I am running 2003 (but I think that office
tool has been around for a while) On Sat, 7 Oct 2006 17:35:01 -0700, Graham Y wrote: Eric in which version of Office was this introduced? TIA "Eric Lachowitz" wrote: If I am understand your problem correctly... Have you tried assigning a personal digital certtificate to your project file/VBA application and setting the macro level to High in Excel? Microsoft office allows you to make digital certificates for just that purpose - so you can be prompted before you accept running a macro from an untrusted source only once (trust those you want - discard those you don't - in this case you will be trusting your file and disgarding the data source macros without the hassle of being prompted). To make a certificate: Start Microsoft Office Office Tools Digital Certificates for VBA Projects To apply it to your project file: In your VBA editor under tools Digital Signature ....I think this is what you were asking and is one way to go about trying to work around security. Good Luck. -Eric On Sat, 7 Oct 2006 08:45:20 -0400, "Lew" wrote: I'm writing an automation project which involves extracting data from ss we receive from a bewildering number of sources, and we're afraid of the possibility that my app may trigger a malicious macro. I understand that I've got to set the AutomationSecurity value to 3, but I've still got a few questions. First: The tools-macros-security tab has 4 values; why can I only set the AutomationSecurity value to 1, 2 or 3 (ie only 3 possible values)? Second: If I set AutomationSecurity to 3 and, since we plan to disable user interaction with excel while my app is running by making excel invisible, is there any possibility that a macro (or anything else) could trigger a dialog requiring user input & resulting in an apparent hang? If yes, will DisplayAlerts = false take care of this? Please bear in mind that the only thing we're doing (as of now anyway) is pulling values out of cells, not anything that I see as requiring interaction. Other suggestions or things to watch out for? TIA! |
#6
Posted to microsoft.public.excel.programming
|
|||
|
|||
Programmatically preventing macros issues
If you are using the clipboard and have a large amount of data, when you
attempt to close the file you could get a prompt to retain the information in the clipboard. You can suppress this with DisplayAlerts or you can copy an individual cell to the clipboard before closing the workbook. -- Regards, Tom Ogilvy "Lew" wrote in message ... I'm writing an automation project which involves extracting data from ss we receive from a bewildering number of sources, and we're afraid of the possibility that my app may trigger a malicious macro. I understand that I've got to set the AutomationSecurity value to 3, but I've still got a few questions. First: The tools-macros-security tab has 4 values; why can I only set the AutomationSecurity value to 1, 2 or 3 (ie only 3 possible values)? Second: If I set AutomationSecurity to 3 and, since we plan to disable user interaction with excel while my app is running by making excel invisible, is there any possibility that a macro (or anything else) could trigger a dialog requiring user input & resulting in an apparent hang? If yes, will DisplayAlerts = false take care of this? Please bear in mind that the only thing we're doing (as of now anyway) is pulling values out of cells, not anything that I see as requiring interaction. Other suggestions or things to watch out for? TIA! -- -Lew The workers took the robot for Maria. |
#7
Posted to microsoft.public.excel.programming
|
|||
|
|||
Programmatically preventing macros issues
Guess I didn't say enough. The data is being pulled out by my VFP code into
corporate data stores. This allows us to have a single platform for pulling from a large variety of sources ... (text, word, excel, ftp stuff, etc...) -Lew "Tom Ogilvy" wrote in message ... If you are using the clipboard and have a large amount of data, when you attempt to close the file you could get a prompt to retain the information in the clipboard. You can suppress this with DisplayAlerts or you can copy an individual cell to the clipboard before closing the workbook. -- Regards, Tom Ogilvy "Lew" wrote in message ... I'm writing an automation project which involves extracting data from ss we receive from a bewildering number of sources, and we're afraid of the possibility that my app may trigger a malicious macro. I understand that I've got to set the AutomationSecurity value to 3, but I've still got a few questions. First: The tools-macros-security tab has 4 values; why can I only set the AutomationSecurity value to 1, 2 or 3 (ie only 3 possible values)? Second: If I set AutomationSecurity to 3 and, since we plan to disable user interaction with excel while my app is running by making excel invisible, is there any possibility that a macro (or anything else) could trigger a dialog requiring user input & resulting in an apparent hang? If yes, will DisplayAlerts = false take care of this? Please bear in mind that the only thing we're doing (as of now anyway) is pulling values out of cells, not anything that I see as requiring interaction. Other suggestions or things to watch out for? TIA! -- -Lew The workers took the robot for Maria. |
#8
Posted to microsoft.public.excel.programming
|
|||
|
|||
Programmatically preventing macros issues
I guess that would mean you using ADO.
If your using ADO, then you don't start the excel application and you should not get any prompts except for errors. -- Regards, Tom Ogilvy "Lew" wrote in message ... Guess I didn't say enough. The data is being pulled out by my VFP code into corporate data stores. This allows us to have a single platform for pulling from a large variety of sources ... (text, word, excel, ftp stuff, etc...) -Lew "Tom Ogilvy" wrote in message ... If you are using the clipboard and have a large amount of data, when you attempt to close the file you could get a prompt to retain the information in the clipboard. You can suppress this with DisplayAlerts or you can copy an individual cell to the clipboard before closing the workbook. -- Regards, Tom Ogilvy "Lew" wrote in message ... I'm writing an automation project which involves extracting data from ss we receive from a bewildering number of sources, and we're afraid of the possibility that my app may trigger a malicious macro. I understand that I've got to set the AutomationSecurity value to 3, but I've still got a few questions. First: The tools-macros-security tab has 4 values; why can I only set the AutomationSecurity value to 1, 2 or 3 (ie only 3 possible values)? Second: If I set AutomationSecurity to 3 and, since we plan to disable user interaction with excel while my app is running by making excel invisible, is there any possibility that a macro (or anything else) could trigger a dialog requiring user input & resulting in an apparent hang? If yes, will DisplayAlerts = false take care of this? Please bear in mind that the only thing we're doing (as of now anyway) is pulling values out of cells, not anything that I see as requiring interaction. Other suggestions or things to watch out for? TIA! -- -Lew The workers took the robot for Maria. |
#9
Posted to microsoft.public.excel.programming
|
|||
|
|||
Programmatically preventing macros issues
Hi Tom:
VFP uses the excel com interface. I can grab an existence of the excel.application object if one exists in the desktop environment or create one if necessary, so I'm using the excel internals to get at the data, not ADO (unless, of course, excel itself uses ADO to manage its own data). -Lew "Tom Ogilvy" wrote in message ... I guess that would mean you using ADO. If your using ADO, then you don't start the excel application and you should not get any prompts except for errors. -- Regards, Tom Ogilvy "Lew" wrote in message ... Guess I didn't say enough. The data is being pulled out by my VFP code into corporate data stores. This allows us to have a single platform for pulling from a large variety of sources ... (text, word, excel, ftp stuff, etc...) -Lew "Tom Ogilvy" wrote in message ... If you are using the clipboard and have a large amount of data, when you attempt to close the file you could get a prompt to retain the information in the clipboard. You can suppress this with DisplayAlerts or you can copy an individual cell to the clipboard before closing the workbook. -- Regards, Tom Ogilvy "Lew" wrote in message ... I'm writing an automation project which involves extracting data from ss we receive from a bewildering number of sources, and we're afraid of the possibility that my app may trigger a malicious macro. I understand that I've got to set the AutomationSecurity value to 3, but I've still got a few questions. First: The tools-macros-security tab has 4 values; why can I only set the AutomationSecurity value to 1, 2 or 3 (ie only 3 possible values)? Second: If I set AutomationSecurity to 3 and, since we plan to disable user interaction with excel while my app is running by making excel invisible, is there any possibility that a macro (or anything else) could trigger a dialog requiring user input & resulting in an apparent hang? If yes, will DisplayAlerts = false take care of this? Please bear in mind that the only thing we're doing (as of now anyway) is pulling values out of cells, not anything that I see as requiring interaction. Other suggestions or things to watch out for? TIA! -- -Lew The workers took the robot for Maria. |
#10
Posted to microsoft.public.excel.programming
|
|||
|
|||
Programmatically preventing macros issues
Then the original answer was appropriate.
-- Regards, Tom Ogilvy "Lew" wrote in message ... Hi Tom: VFP uses the excel com interface. I can grab an existence of the excel.application object if one exists in the desktop environment or create one if necessary, so I'm using the excel internals to get at the data, not ADO (unless, of course, excel itself uses ADO to manage its own data). -Lew "Tom Ogilvy" wrote in message ... I guess that would mean you using ADO. If your using ADO, then you don't start the excel application and you should not get any prompts except for errors. -- Regards, Tom Ogilvy "Lew" wrote in message ... Guess I didn't say enough. The data is being pulled out by my VFP code into corporate data stores. This allows us to have a single platform for pulling from a large variety of sources ... (text, word, excel, ftp stuff, etc...) -Lew "Tom Ogilvy" wrote in message ... If you are using the clipboard and have a large amount of data, when you attempt to close the file you could get a prompt to retain the information in the clipboard. You can suppress this with DisplayAlerts or you can copy an individual cell to the clipboard before closing the workbook. -- Regards, Tom Ogilvy "Lew" wrote in message ... I'm writing an automation project which involves extracting data from ss we receive from a bewildering number of sources, and we're afraid of the possibility that my app may trigger a malicious macro. I understand that I've got to set the AutomationSecurity value to 3, but I've still got a few questions. First: The tools-macros-security tab has 4 values; why can I only set the AutomationSecurity value to 1, 2 or 3 (ie only 3 possible values)? Second: If I set AutomationSecurity to 3 and, since we plan to disable user interaction with excel while my app is running by making excel invisible, is there any possibility that a macro (or anything else) could trigger a dialog requiring user input & resulting in an apparent hang? If yes, will DisplayAlerts = false take care of this? Please bear in mind that the only thing we're doing (as of now anyway) is pulling values out of cells, not anything that I see as requiring interaction. Other suggestions or things to watch out for? TIA! -- -Lew The workers took the robot for Maria. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Preventing users from changing macros | Excel Discussion (Misc queries) | |||
preventing macros from clearing the undo list | Excel Programming | |||
Disable Macros in workbook programmatically | Excel Programming | |||
preventing disabling of macros | Excel Programming | |||
Parametrized Macros preventing other macros | Excel Programming |