 |
drshaw Level: Guest

|
vba to vb possibly?
HI, I am in need of a little advise to set me off in the right direction.
I am a VBA Developer on MSWord, I have developed some code which I want protecting and have password protected it, it has come to my notice that there is a backdoor facility into VBA projects to allow instant access, so I am looing toward VB to see if I can move the development over and have a bit more security.
Not knowing what all the different types of projects are is making a direction difficult, I was thinking about making a ActiveX DLL file and connecting it to MSWord through the VB IDE, before I spend hours researching this, can anyone tell me if this is the correct way to go or should a different project type be selected, the project has forms, modules and a class module in it that I need to duplicate, I also need to generate a toolbar in Word that will run the code.
Any help would be greatly appreciated
Thanks
David
|
|
17-06-2003 at 01:27 PM |
|
|  |
|
|
~Bean~ Level: VB Guru

 Registered: 07-04-2003 Posts: 488
|
Re: vba to vb possibly?
I am not sure of the "backdoor" but I do know that all Office files, including VBA modules, have wimpy security, in other words, easily hacked. HOWEVER, someone must first be inclined to do so... IMO you should first decide whether it is worth your trouble to RE-Write your entire project...? I am also wondering if you have experience using VB? Also, what is the purpose of the Word Doc? Is it a report? Is it connected to any other data source?
As I see it you have several options...including:
- Leave it in Word and trust Word's security to be sufficient for most users.
- Re-write the entire project in VB and forget Word. (start a new project and choose "Standard EXE" as the project type.)
- Re-write your functions as DLLs, leaving your forms and some code in Word. ("DLL" as your project type)
- Try something out of the box...i.e., remove all the code from your Wrod doc. Then, when the doc starts up, load your code from an encrypted (text) file into the Word VBA modules.
Without knowing more about the nature of your app, I recommend the first option...
____________________________
Eggheads unite! You have nothing to lose but your yolks.
|
|
17-06-2003 at 05:45 PM |
|
|
drshaw Level: Guest

|
Re: vba to vb possibly?
Thanks Bean, I have done a bit of reasearch and found the joy of Addins and am currently looking toward that, the project is a commercial venture adding functionality to Word so the whole security thing is a bit of an issue, The bits I have done in Addins is very exiting (What kind of a geek do I sound like) like VB and can see more work heading that way, opens up a whole new world and new challenges, talking of that I have a little addin that adds a toolbar into Word,works so far, I cannot get it to do anything.
I have highlighted the line that is erroring but I don't know why. I am using VB6
Private WithEvents myEcontrol As CommandBarEvents
Private Sub AddinInstance_OnConnection(ByVal Application As Object, ByVal ConnectMode As AddInDesignerObjects.ext_ConnectMode, ByVal AddInInst As Object, custom() As Variant)
Dim mybar As CommandBar
Dim mycontrol As CommandBarControl
Set mybar = Application.CommandBars.Add("Test bar")
Set mycontrol = mybar.Controls.Add(msoControlButton)
With mycontrol
.FaceId = 20
.Tag = "TestControl"
.OnAction = "!<StartForm>"
End With
Set myEcontrol = Application.Events.CommandBarEvents(mycontrol)
mybar.Visible = True
End Sub
Thanks
David
|
|
18-06-2003 at 03:08 PM |
|
|  |
|
|
|
|
 |
 |