PDA

View Full Version : Disabled macros in files shared on network



rborgione
06-03-2014, 08:16 AM
I am working on cleaning up the share drive for my office. With the big picture in mind, I wanted to make sure the new & improved share drive stays neat and tidy. I have taken some of our frequently accessed forms and written macros to save them to a specific file destination and in a specific format. I wanted to make things as simple, cut & dry as possible so even the least computer-savvy person in the office would be able to confidently execute things. Through trial and error, I used the following code (tied to a button on the quick access toolbar) to accomplish my goal:

Sub FirstInitialLastName()
'
' FirstInitialLastName Macro
'
'
docname = InputBox("Enter LastName, FirstName", "docname")
ymd = Month(Now()) & "." & Day(Now()) & "." & Year(Now())
fp = "Z:\Share Drive\Development\Major Gift Officers\FirstName\LOC's\"
fn = docname & " - " & "LOC" & " - " & ymd
ActiveDocument.SaveAs2 FileName:=fp & fn & ".docx"
End Sub

It works great, BUT I'm encountering a problem when I hyperlink this Word doc through a shared Excel workbook. Everything works as it should on my computer, but when other people in the office tested it for me on their computers the file opens, but the macro does not run when the button on the quick access toolbar is clicked. The error (shown below) pops up citing a security issue running the macro. I've had them enable macros in the trust center for both Word & Excel and it's still not working. Thoughts???
11771

Zack Barresse
06-04-2014, 09:06 AM
Moved from: http://www.vbaexpress.com/forum/showthread.php?49640&p=310241#post310241

Please try to stick to your own thread. This helps you, as well as others, keep track of your own threads, and keeps solutions from being misconstrued in different questions in the same thread. :)

ranman256
06-04-2014, 12:45 PM
THAT message is because of Trust on macros.
In new 2007 on File, options, trust center, macro settings, Enable all macros.