Creating a dll for use in word xp vba

dchapin

New member
Joined
Sep 18, 2008
Messages
4
Programming Experience
Beginner
Hi,

I am very new to Visual Studio 2008 (like a week). I have done a fair amount of VB6 programming as well as VBA and most of the web languages. This has got me stumped, if not by the method then certainly by the lack of help I can find on the subject. (Ive googled into unconciouseness).

I have a very robust amount of VBA code which is used for a toolbar word application. My users are Word XP, Word 2003 and now 2007, My app is working fine for all of these folks. I want to protect my code a bit more by placing my modules into a vb dll. I have tested some of my code in VB6 and it all works fine, however I would rather port over to a dll created in Visual studio 2008.

I have performed all of the steps that I can find to do this, starting with a simple import into Visual studio (works fine) which creates the dll and works perfectly fine when referenced and used in VB6, however when I reference the tlb using word xp VBA, I can see my dll, but when run, I get a dependency error. I have check to be sure that the Register for COM interop checkbox is checked before build. My subs and functions are public.

I guess at this point after days of trying and trying, I am looking for A:) some direction, B:) to be told it is not possible, C:) i'd be happy to get a "It's possible, but were not gonna tell you" . I just cannot figure out whats going on here. As I said, my dll/tlb works fine in VB6 just not at all in word xp or 2003, It DOES work in word 2007.

Any help or direction you can provide would be greatly appreciated.
Dan
 
Been There Tried That

Hi John,

First, Thanks for the reply. I have tried this both using the wizard and by hand. As I said, I am using Visual Studio 2008 with sp1 applied. This Does not create a dll that can be used with Word XP. I get a missing dependencies error. This does work fine in vb6, but thats not where I need it. I will need to deal with 2003 also but the vast majority of my users are word xp.

Any ather ideas.
DC
 
I also once saw some dependency error with a .Net COM in Excel 2003 on a fresh system install, something like "the system cannot find the file specified", the problem resolved when all latest Windows Updates were installed. It could incidentally be KB907417 but I can't be sure about that.
 
Yep saw that one also

That may be the case for word 2003 but doesnt help much with Word xp. I read that one and got excited the other day. I immediatly went out and made sure that my office was updated fully. I also made sure that my windows xp was up to date and downloaded and installed sp1 for Visual studio 2008, all to no avail.

I just wish that somewhere I could find a yes it can be done or no it cant. I just cannot imagine that someone else has not had this issue.

Thanks again! DC
 

Latest posts

Back
Top