Choosing between Excel Add-In, Template and Workbook? - visual-studio-2010

I'm looking for some high-level help with determining the best type of Visual Studio 2010 project to use for an Excel custom application.
I will be developing a program that requires the user to enter a dataset in a particular way. Not using a form per se, but rather in columns and the program will need to do some custom validation on the items in order to prep the data. From there, the user will be able to conduct various operations on the data via a custom Ribbon and associated options. The program will also transmit the data via web service.
I've fooled around with the Add-In project and that gives me a lot of what I need but I'm wondering if a Template or Workbook project is better for this in terms of data entry and being able to "guide" the user a little more.
How do you go about choosing between which project type to use? Do all the project types support a custom Ribbon?

Sorry if this is too far off topic. I'm referring to VBA, not Visual Studio, but it might still be relevant.
With an AddIn, compared to a Workbook, you can separate your code from the user's data. So, if the code is complex, and you'll need to update it separately from user's workbooks with data, this is not a bad idea.
With an AddIn, you can add buttons that do things like check to make sure the user data workbook is ok, or process it in someway. However, the AddIn custom buttons will load ever time a user opens any Excel worksheet. This doesn't sound good, but in practice, isn't so bad. You can code your AddIn so it does nothing as long as no one uses a button, so it almost doesn't hurt load times, etc...
A Workbook might be useful if you need to really guide the user - that is, you cannot rely on the user to hit a button to verify something, and instead you need to verify on every change, for example. However, the workbook solution incorporates the user data and your code in the same workbook, so if you need to update the code for existing users' data, that's harder.
I use a combination of AddIn (.xlam) with buttons, and a template (with minimal self-describing data only).
I'm not sure about the template-only option, so won't comment on that.

Related

Custom form in Outlook Task is not syncing

My partner and I created a custom task form to be used in Outlook using the developer mode to do that, and we published it to the Organization Forms Library for anyone to open. We're running into issues that I personally can't seem to find on how to resolve:
Custom forms aren't syncing correctly.
When I complete out the custom form, and I assign it to someone else they might be missing details like the dates I picked from the date picker, and text within the text box are gone too. It's very odd that sometimes some would get all the details that an end-user would input but that's like a 1/8 chance. I feel like there's a disconnect where it just won't behave like any other task. Cache mode or no cache mode doesn't matter it seems. When the person assigns it back with changes made on their end, those changes aren't seen on my side. I just have the same original details that I made when I first made it. We're on Exchange Server 2010.
Looks like a custom form was not published correctly to others in the organization. Try to create a new Outlook item on other machines with your custom forms to make sure they were deployed correctly.
Note, message forms default to separate layouts for composing and reading. Many people find their first message form doesn't look right when they receive an item created with it. That's simply because they forgot to click the Edit Read Page button and customize the Read layout!
You may find the Customizing Outlook Message Forms article helpful.

Visial Studio - MS Teams - Auto Email Changes to Spreadsheet - Is this possible?

Visual Studio 2017
Microsoft Teams
Scenario:
Within Teams we have a team with a tab that contains a spreadsheet. Users can enter information w/ a new number and the name of the person responsible etc.
Is it possible that when this item is entered that an email can automatically be sent to the person responsible from within Teams?
I have done some initial research and so far I do see where you can create apps BUT I just would like to know if what I am proposing is possible and if so would it be a monumental undertaking or shouldn't be too difficult.
Any thoughts/feedback appreciated,
Thank you
There are actually two problems to solve here. One, how to detect that something happened in Excel. Two, to take action on that event and send email.
For both of these, you can create Excel macros using VBA (transforming the file from xlsx to xslm). XSLM files require the full Excel client though and don't run well on the web version of Excel. I can't think of another way to do it using Excel.

programmatical GForge upload and download

INTRODUCTION
I am part of a project team which uses an old GForge system (community edition v5.6.1) to host our source code and provide some further services. One builtin service is the upload and download feature. Thus users can easily get the generated application version. In order to provide this downloadable version, we as developers have to use a browser (e.g. IE or FF) to navigate into the appropriate GForge page, then tick some buttons, fill some text boxes and finally hit an "upload" button which opens a file dialog to specify any file to be uploaded into the GForge download area. For a download, the procedure is similar. Additionally, from time to time there comes a separate WEB page to request a session login.
Now, as we as developers are in a "hot phase" and need to provide downloadable versions with high frequency, the procedure described above is much too error-prone concerning essential parts of the release, and too slow. Besides that, there is always a real person necessary in front of the screen to click around.
QUESTION
How can we manage to programmatically upload and download generated software versions into and out of GForge's download area while overcoming the password page on the first hand (of course using a valid user account)?
WHAT WE'VE TRIED SO FAR
Using a Python script. Python provides very helpful modules like "urllib", "urllib2" and "requests", with which any HTTP access (even the ones with session password protection) should be managable. After many hours of trying, the GForge system only returns the password request page. Not any of the interesting files. Even far away from uploading anything.
Using an AutoIt script. AutoIt can automate mouse movements and keyboard presses as well as direct access of visible elements on the screen. It provides a "Window Info" application to identify any window element. But e.g. buttons and text fields within WEB pages (HTML) are not recognized. So we don't know how to correctly identify GForge's password text field in order to move the mouse there, and type in the necessary text. And from there go on imitating the person sitting in front of the screen.
Does anybody have some experience regarding the solution of our problem?
I'd upgrade your system to v6.4.2 (current GForge version). From there you will have access to the SOAP interface which will make all this possible. When GForgeNEXT is released, https://next.gforge.com, the SOAP interface will be replace by a REST-ful API making this integration even easier.
The upgrade to v6.4.2 from 5.6.x will be a bit painful but our team would be happy to help, just create an account on gforge.com and then open a free support ticket here:
https://gforge.com/gf/project/gforge5/tracker/?action=TrackerItemBrowse&tracker_id=10345
Disclaimer: My company manages GForge so the advice given above I'd give to any paying client. For further clarity, files in GForge are stored in the file system. The SOAP interface allows you to reach into the database for any ticket or document grab the appropriate document and even replace it. Programatically, it is the cleanest answer.

What is imgMain control in visual Basic 6?

I'm using a VB6 application as a reference and have come across imgMain. I'm assuming its an image control, however, I cannot find the object on any of the forms. It's used to load the image. I'm just not sure what's going on with this. I'm assuming its an IMAGE CONTROL, but I cannot find this on any of the forms? it's mentioned a lot of times in teh application as it lets you view incoming faxes and stuff.
Without having a look on source code i assume It might be custom user control that was created for some reasons probably to extend basic picturebox control.
One thing i can advise you is to further inspect code and dig to code of this custom control. If code for this control is not available then see what methods and properties instances of that particular control uses and compare them with regular picturebox.

How to add controls (programmatically) to a Visual Studio designer WinForm

In my current job we are not allowed to use databinding. I’m currently using a code generator (ORM) to generate the data layer objects. In the past I usually generated a data source (from the object) and do a drag and drop to automatically add the controls (with the correct databinding to the WinForm).
Is there is a way to do something similar (programmatically) using Visual Studio?
I tried to use the a copy and paste approach (by analyzing the data of the control, in the clipboard, generated by VS), but unfortunately the format used by VS to serialize the control to the clipboard is binary (I was hoping that the format was XML because I can easy modify that). Other approaches I tried was generating the designer code using a code generator. Unfortunately this only works if I want to create a new form but it is, from a practical point, unworkable if you want to add new controls to an existing form.
Controls are just objects. Any properties you can set in the designer can be set in code as well. And event handlers are just delegates. You can build the entire GUI without using the designer at all -- just write the code. I've done this several times with dynamically-generated GUI elements.
Spend some time reading through the code that the Visual Studio designer generates, and you'll quickly see how to do the same things by hand.

Resources