How to programmatically get at outlook form code?
To clarify from one of the comments - Outlook form code is the VBA code that sits behind the form - it can be customised in the form design mode to do pretty much what the user needs to do.
Our product relies heavily on form code, but certain bits of it need to be customised per installation. We are looking for some way to automate this process, as we have upwards of 30 custom forms it is a tedious process to do it manually...:-)
Use a configuration file (use ReadFile etc)
Or put the configuration information in a "special" item in a public shared folder
You can also use the "Office Profile Wizard" to package it up with a custom vba module iwht the configuration information in that
You should never write out customised code, that is a big can of worms
Related
I'm new to .NET from an extensive VBA background. I'm building an Excel add-in and have been struggling to find any guidance on line about control of code structure and layout in visual studio.
Comparing to the VBA environment, what I want to do is have different modules for the different components (e.g. one module with all the calculation subs, one module with all the formatting subs, one module with all the custom charting subs, etc.) but cannot find any guidance on how to set this up.
I've put the skeleton of the ribbon tab in, with some icons etc. and VS has automatically created tabs as follows:
Ribbon1.Designer.vb, which appears to house setup code - adding groups and buttons etc.
Ribbon1.vb, which now contains a few subs I've written in 'Public Class Ribbon 1'. This is the bit I want to "modularise".
I have tried creating another public class which didn't work, and a few other things. I also saw mention of "sub classes" though could not find any instructions/examples and couldn't get this going myself (or if I need to specify inheritance from one to another?).
From a user friendliness perspective for me, one tab in VS per category of subs would be the ideal but I'm amateur so definitely open to learning how to structure it all properly. Yes, I wish I had software engineering training!
Screenshot
Maybe a noobish question, but here it goes:
My goal is to install an Excel Add-in.
I have all the code in a Module, organized in several Sub()s. I saved the Add-in in the Excel Add-ins folder. When trying to add the Add-in as a button/custom menu
(File/Options/Customize Ribbon/Macros), I see all Sub()s listed.
Is there a way to hide some of the Sub()s from being listed ? I only need the main one; displaying all of them becomes confusing when using multiple add-ins, especially since most of the Sub()cannot run be run by themselves. Are there any good practices for organizing the code in order to prevent this ?
If you write Option Private Module on top and you make the subroutines private, they would not be visible.
See more here for Option Private Module.
I have an Infopath 2010 form that's been developed for a document library in SharePoint 2010. The form contains custom VB code, which is saved on a shared drive.
However, should the VB project on the shared drive get deleted/damaged/forgotten about, is there a way to retrieve the custom code from SharePoint itself? I know you can go to Library Settings>Advanced Settings>Document Template>Edit Template to retrieve the Infopath form, but when you attempt to edit the custom code, Infopath asks for the VB project location.
Does a plain-text, uncompiled version of the code get stored somewhere in SharePoint when the form is deployed?
When I have needed to get the code for a form and don't have access to original code files, one approach I have taken is to save the form as source files (either unzipping the template with a tool like 7-zip or from the publish menu in InfoPath in design mode) and then decompiled the code DLL with ILSPY. Imperfect & a bit of a pain, but has allowed me to see what may be going on in a template file and recreate the source code when needed.
Found my own answer - looks like I'd be out of luck.
http://www.bizsupportonline.net/blog/2013/recover-make-changes-infopath-forms-sharepoint.htm
Paragraph at the bottom just before "3 ways you can find out whether code was written for a form template"
That's a pretty helpful feature, Infopath...
I wondering if its possible to use Microsoft Word as a text editor in a VB.Net project?
My project currently uses a Rich Text Box to allow the user to right a report which is then saved and a report generated. I was wondering if i could switch to Word for better formatting and layout options, be it embedded in the actual form or in another form thats called (if that makes it easier to assign the control).
I have worked on opening Word itself via a button click but would like to have it incorporated in the project. All users that would actually use the program would have one of the more recent versions of word installed.
Any pointers to websites would be great as i'm constantly searching but not getting very far
Thanks
Is it possible to display an HTML page in an Office 2003 and/or 2007 task pane via VBA?
Background: We have a complicated configuration file that our users maintain in Word (using a real editor is not an option for our audience).
We would like to create several toolbar buttons that display a basic HTML page in a task pane as a form of online help for our users.
The reason we want to use a task pane to display help (vs. an external browser or traditional help engine) is so that the help content is "embedded" in Word vs. displayed via a seperate application. The problem with using a regular browser or help engine to display help is that users have to manually size and position both applications so that they can see them simultaneously and its very easy to "lose" one application when togging between many applications.
We don't want to go down the route of writing a VisualStudio based task pane component - we want to keep things simple (KISS) and encapsulate everything in an easy to distribute Word template file (.dot or dotx.).
Suggestions?
Yes it is possible, see this blog for detailed steps in creating the custom task pane in Excel 2007.
http://blogs.msdn.com/gabhan_berry/archive/2008/08/13/custom-task-panes.aspx