Drawing Password

Drawing Password

Anonymous
Not applicable
400 Views
1 Reply
Message 1 of 2

Drawing Password

Anonymous
Not applicable
Has anyone ever SET a drawing password using VBA when you do a SAVEAS? I have tried it a few different ways and it keeps crashing my machine. Did a search on the internet for a few different words and nothing. The documentation talks about the Password, but only for Opening a drawing. Thanks, Kevin Grigsby
0 Likes
401 Views
1 Reply
Reply (1)
Message 2 of 2

Anonymous
Not applicable
Thanks to a colleague, Sub test() Dim oSecurity As AcadSecurityParams Set oSecurity = New AcadSecurityParams With oSecurity .Action = AcadSecurityParamsType.ACADSECURITYPARAMS_ENCRYPT_DATA .Algorithm = AcadSecurityParamsConstants.ACADSECURITYPARAMS_ALGID_RC4 .Comment = "My test" .Issuer = "MTuersley" .KeyLength = 40 .Password = UCase("mypassword") .ProviderName = "Microsoft Base Cryptographic Provider v1.0" .ProviderType = 1 .TimeServer = "" End With ActiveDocument.SaveAs "C:\MyDrawing.dwg", , oSecurity End Sub "Kevin Grigsby" wrote in message news:400bed54$1_3@newsprd01... > Has anyone ever SET a drawing password using VBA when you do a SAVEAS? > > I have tried it a few different ways and it keeps crashing my machine. Did > a search on the internet for a few different words and nothing. The > documentation talks about the Password, but only for Opening a drawing. > > Thanks, > Kevin Grigsby > >
0 Likes