QRCoder
QRCoder copied to clipboard
QRCoder in VBA Excel
Type of issue
[ ] Bug
[X] Question (e.g. about handling/usage)
[ ] Request for new feature/improvement
Expected Behavior
Regarding your post: https://en.code-bude.net/2017/05/21/how-to-generate-swiss-qr-code-in-csharp-and-vba/
do you provide the COM-interface? As the QRCoder is already in use in VBA projects, do the users provide their own COM interface?
Regards,
Current Behavior
Possible Solution (optional)
If I succeed to use QRCoder in VBA, I would fork my code (I have to learn to do that first! may be it is already done!)
Steps to Reproduce (for bugs)

Your Environment
- Version used: 1.3.7
- Compiled from source or NuGet package?: from source. In the Build properties, registered to COM
- Environment (.NET 3.5, .NET 4.X, .NETCore, ...): .NET 4.x
Hello @pldeschamps ,
currently I'm neither providing a COM-interface nor a binary for use in VBA environments. As you have found out, I have described how one could do it, but I don't provide a working solution.
Background: When writing the article mentioned above, I tried to write a small wrapper and setup a COM-compatible variant. It worked quite well for me in the main features, but there were two problems:
- To make it publicly available, I wanted either a fully functional version or none at all. Unfortunately I got stuck when trying to write the wrapper for the SwissQRCode payload generator class (see here: https://github.com/codebude/QRCoder/blob/master/QRCoder/PayloadGenerator.cs#L644), which made me some headaches and wasn't as easy to port to the COM-interface as expected. (I feared that it would become a hugh mess, what I wanted to avoid.)
- I tried my sample project (COM-compatible DLL and Excel VBA project) on different environments (Win 7, Win8, Win 10, x86, x64, ...) but on some systems I just resisted to work whereas on other systems it worked like a charm. Out of fear to lose the trust of the users and to squander the good reputation of QRCoder, I have waived a publication.
Hello @codebude , Your project is awesome! I agree: you should maintain the trust of the users. Hence not adding VBA which is a messy language! I did make a fork: https://github.com/pldeschamps/QRCoder and a COM-interface: https://github.com/pldeschamps/QRCoder/blob/master/QRCoder/QRCodeCOMInterface.cs At this stage I did not succeed to import the bitmap or the byte array to VBA from the COM-interface. But I guess I can bypass this problem by writing the bitmap in a file (but this is not clean as I use the file system).
I am not familiar with licences in general and with MIT licence in particular: Do I have the full copyright of my class? What is your politic? should I keep the same version number? should I change the Project name? Project description? Assembly name? Do you mind at all? Are you OK with what I have done in my fork? Do you mind at all?
Regards,