How to show custom update/modifications text when I publish my outlook-addin. VB.NET - vb.net

Recently I have created an Addin for my outlook 2013 in VB.net. I usually do a lot of modifications on this application especially in the beginning. These modification automatically download when a user starts its outlook as soon I publish the project.
The question I have, and which I cant seem to figure out how to do it is:
Is it possible to show the user some kind of custom made UPDATE pop-up text when outlook automatically updates the addin?
So a user starts its outlook, then the outlook usually executes the updates pretty fast and then I want them to show some kind of message which contains the updates being done.
I have no clue if this is possible though and I cant seem to find an option for it in the publish tab of visual studio. Can this be done with code, and if so, how?

ClickOnce doesn't provide anything for that. See Deploying an Office Solution by Using ClickOnce for more information.
In the new version of the software which you are going to publish you may add a message box. It can be shown for the first run only. For example, add a windows registry key which indicates that the add-in (new version) is run for the first time. Reading the value at runtime will help you to decide whether such message box is required or not.

Related

Debug .NET com dll when running from Access

I have a com dll developed in VB.net that provides an interface to eBay api's. Been working for many years. Recently eBay change certificate authority and moved to TLS 1.2. Sorted through that but now the dll seems to quit in mid transaction when called from Access. The functionality does listings from local inventory to eBay. The first part loads pictures of the listing item to eBay. That works fine. I can see the calls and responses using Fiddler. It then moves on to actually listing the item which seems to stop when called from Access. What I get back in Access is "Can't find x.dll at file location". I know the call is going to the dll because it uploads the pictures.
I have a test project developed in VB.net to test the dll and when run from that everything works. I can see the listing call and response in fiddler. When run from Access there is no listing call. I can verify that the endpoints for the calls are the same from test project or Access.
My question is how to debug the dll in the Visual Studio IDE when it is called from Access. Any thoughts?
Yes, the way you do this is open up the vs class you have for the .dll.
Then in debug of the project, setup this:
Now, when you hit f5, then access will launch and run.
If at this point, say you close access (exit), then you note the debugging process stops.
However, go though the forms and whatever in Access, and get to the point where you hit that button or whatever.
You find now that you can say set a break point and even step and debug your .net code like any other code. So say in my example (a custom sage 300 .net interface to access), I want to debug "find customer" routine from VBA.
Well, in vb.net I have this code:
so, when any routine - even those in the class instances is called, you can set break-points etc.
And to stop? Just exit access.
So, you can make a change to your code, and even hit f5.
It not clear how you are registering your .dll (or do you use some VBA to side-load the .net - that's what I do, since it is a pain to have to register my .net com objects on each PC.
But, do give the above a try. It should let you debug your .dll code. The trick is to have VS launch ms-access as a attached debug session - and that is exactly what the above setting in your class project above allows you to do.
do note in above, I used the path to access 2010 (access 14), so replace the path name to the access.exe with your version of access you are using.
And keep in mind, that if have some installer, or some custom "thing" that registers your .net .dll for you?
Well, during this process, if your VBA assumes a registered com object, then ensure you have this check box enabled:
On compile for the project settings, you thus want this option checked:
NOTE very careful, checking the above option does not change the code or anything at all - it ONLY does a regasum automatic for you, and this would of course re-register your existing .dll - which is what we want for debugging. After you done, do run your re-register of your .dll to switch back from the debug .dll that going to be in your current project bin folder to whatever you "regular" use on your PC.
FYI:
In MOST cases, I find this whole idea does NOT work unless you launch VS as administraor. So, make sure VS is being run as administraor for this to work.
I tend to just tap windows key, or even right click on your vs shortcut, and of course choose run as administraor.
This is so often required, you note that VS will EASY and quite CLEAR show you running in admin mode, and I quite much now always run VS this way.
You should see this:

Prevent copy of app from overwriting the original

I'm working on a windows phone application for an event. The event has an last year's event already had a windows phone application and all I really need to do are some updates. So I made a copy of the old application and started modifying it instead of creating a new solution from scratch.
Now here's my issue: when I deploy the new event application with Visual Studio to my phone it overwrites the old application. This is something I don't want, as I want to be able to compare the two on my phone. I also suspect that this might give me some issues when I upload the application to the store.
I suspect that this has something to do with copying files that are supposed to be unique for each application.
Any help would be appreciated!
The way I fixed this was by generating a GUID id using the GUID generator in Visual Studio ( as suggested by #Robert ). And changing the GUID in the WMAppManifest.xml and Package.appxmanifest files.

VB .NET run without form and without UAC when /q argument passed

I'm VERY new at VB .NET and have recently downloaded MS Visual Studio Express 2012. I'm trying to design an application to replace a VBScript I created and can't find the answer to Two of the main design phase features I require so I apologize ahead of time for my ignorance.
I'm trying to create an application to edit the configuration parameters of an existing application I support. the configurations are edited in both the Files System and in the Windows Registry.
I'm looking for a way to pass a "/q" or "/quiet" and allow the application to run silently. I have developed the program far enough to edit the options in the form and save them. I can run code (so far only messages displaying the options) from the start configuration button from a "Windows Form Application".
I'm also needing to make sure that when running silently the application does not need UAC elevation. In the original VBScript I need to elevate UAC when editing the Windows Registry.
I know this is a lot to ask for with my current knowledge level. But I'm still in the design stage and trying to learn fast and really need to know if this is even possible before I go too far.
If the original application required UAC elevation to edit the registry then the new one will too. The level of access is on a per user basis not a per application basis so unless you run the application as a different user you will have the same problem with your new application.
As to running without showing the form you will need to edit Main something like this:
<STAThread()> _
Shared Sub Main()
' Read the arguments
' Starts the application.
if (argument == "/q" or argument == "/quiet") then
' Edit the other program configurations here
else
Application.Run(New Form1())
End if
End Sub
You can call a version of Run(ApplicationContext ) that doesn't show a form, but as the starts the message loop you'd still need some way of actually editing the other program's configuration, perhaps in response to key strokes.

What are my options to print an email to TIFF from Outlook via an addin?

We have a process at our company that processes TIFF images. I have a project where I want to be able to capture emails that people have received and let them pass it on to our imaging process. Right now forwarding an email isn't really an option but our initial thought was that we could create an Outlook addin that would create and send an image of the email to our internal webservice and it would just work.
I'm developing on Windows 7 with VS2010 and Outlook 2007.
I have the basic addin framework setup - that seems to work OK. The addin is there, popping a regular Windows form where I can do my stuff. But now I'm running into problems. First I was going leverage the built-in Microsoft Office Document Image Writer which can write to TIFFs. However, this doesn't appear to be installed as part of Office 2007 on Windows 7. Then I found some references that it didn't work on Win7 64bit in the first place, and that Microsoft was phasing it out in favor of their XPS printer anyway.
Then I moved on to thinking I could maybe use PDFCreator. This sort of works, except it looks like I have to actually have PDFCreator installed on the client machine, too. I was really hoping I could just bundle the dll and PDFCreator could natively "print", but it seems rely on you setting the active printer to "PDFCreator" and still printing to that. I was already maybe going to run into problems pushing a custom addin out to users in the first place; I don't know if I could get a new printer rolled out as a requirement, too.
On top of that, you apparently can't set the active/default printer in Outlook once it's running. So my plan to run the addin, change the default printer to PDFCreator, print it, then change it back isn't going to work after all anyway.
We really wanted to be able to capture emails as if the user had printed them out and scanned them, which is what they have to do now. I would really not like to rely on copying/pasting into another application if I can help with it.
Sooooooo, what other options might I have? Is there any close to native functionality in Windows or Office that would let me print to something and eventually get a TIFF? Does it look like I'm going to have to try and string together a bunch of 3rd party tools or something? It looks like the only way to "print" an email is to do the MailItem.PrintOut() command, which is just going to go to whatever the current default printer is. Are there any other TIFF-printing things available that wouldn't involve installing a new virtual printer on the end user's machine? Any other ideas? Thanks for any help!
Although you ruled it out at the start of the question...
Assuming you need those tiffs at a central location and not at the employee desktop.... I'd still advise you to have your addin forward the respective mail to a central location (as an attachment to a automated mail, or perhaps just write it to a queue folder on some network location), then have a central process pick it up and print it out to tiff files.
Unless you have exact control over the client machines at your company (which from the sound of it, you don't), you really want to move some fickle as 'switching printers in Outlook' away from the clients.
That doesn't mean this approach doesn't require hacks as well, because that central process will be running outlook to do the work.
I assume it is important that your tiffs look like they were actually printed from Outlook, if not please add that as extra information to your question, as it opens new routes. Like capturing the email-screen rendering and putting that inside a tiff file, which can all be done on any desktop machine.

How do I save and restore all the vb6 ide settings?

I've seen this tip on DevX which should 'account for most of the Visual Basic IDE settings'.
Does anyone whether this is sufficient or whether there are more settings out there?
It looks pretty complete, however if you have custom Add-Ins this will not get them. I did a quick search of my Add-Ins and I don't see any generic way of backing them up as they have their own registry keys. The HKEY_CURRENT_USER\Software\Microsoft\Visual Basic\6.0 has an Addins sub-folder so if you have custom add-ins you should at least get a message that they can't be found. Otherwise, use Process Monitor and take note of the registry keys and files that are read when you start Visual Basic.
They are stored in these two registry keys:
HKEY_CURRENT_USER\Software\Microsoft\VBA\Microsoft Visual Basic HKEY_CURRENT_USER\Software\Microsoft\Visual Basic\6.0
Access them by running Regedit.