How to use vba to switch between open tabs in Lotus Notes? - vba

I'm currently trying to generate multiple forms in lotus notes via VBA in a specific database and send them for processing. Due to several notes scripts running when creating/processing the various forms, the only theoretical way that I can imagine this to work would be to have the user open a form, so that the VBA script can tell it to do copies through a button in the form (via the Windows API), then cycle through the open forms, fill them out and submit them one by one.
So far so good, but I'd need to be able to cycle through all the open forms in Notes in order to find the form I want to fill out and set is as active window. I can't seem to find any API that allows a user to go through all the open tabs in a notes window. Would anyone be able to help me on this one, please?
Many thanks in advance.

What you want to do is not possible. There is no way to "cycle" windows via code in Lotus Notes / IBM Notes.
Better turn around your processing: Instead of opening a form for editing just fill it in the backend. Then you don't need Windows API- calls and the Clipboard at all.
of course you can open the filled form afterwards to let the user fill in additional information, but this is not necessary at all as you can also save the document in backend.

Related

Why would an Access 2010 form button with an embedded "openreport" macro and a "where" filter, stop working until I add a new button?

I decided to "tweak" an existing database to further manage multiple sources of income.
I copied the working database and created a "modification copy", just in case I messed things up horribly.
In the modified version, I have a button on a form (in fact, two different buttons with similar macro properties, just directed to do the same function to different reports.
The properties are your standard macro with an openreport, and a "where" condition.
Here's the problem. The macro has worked in the past, and continues to work on my "pre-modification" operating database.
On the modified database, after ensuring all the parameter elements are entered correctly, I can change the "view" to report view, and the macro seems to work just fine until I close the database.
As soon as I open the database, the buttons produce an error. See pic below.
The only way I seem to be able to resolve this odd button macro issue is by going into design view and adding a new button. I've discovered...I don't even need to embed a macro, just adding a new button seems to renew the macro operation...until I close and reopen the database. Then, I have to add a new button again to get the open database's macro to operate.
I can delete the new button added, and still have the macro buttons work, until I close and open the tweaked database.
I have zero VBA coding knowledge. I use Access's macro building tools and typically have to visit sites like this if I need to learn a new "trick" to get my database and it's various tools to do something.
I recently explored with the "subform" that can be seen above in the open form pic with the error message. My guess is that maybe that subform is somehow causing my macros to continuously fail???
Thanks for any help!

Make a VBA form appear in windows task bar

I am programming a little application (an overgrown macro really) in Visual Basic for Applications in Office 365. What it does is:
Displays one window that has a few input fields.
Once I fill out those fields with data I can press a button on the form and a summary in a nice graphical form is displayed in a second window (a second form is displayed using UserForm2.show).
The second user form can be updated with new data by typing in updated text in first form and updating the second form by pressing a button on the first form (in the form of UserForm2.TextField1.Text = UserForm1.Label1.Text.
Both forms are modeless so the user can work in Outlook whilst the forms are running.
All works fine except one caveat:
Both forms are not visible on the Windows Taskbar, in the Task Manager, but most importantly they are not visible as separate windows to teleconferencing software we are using. And this is the macro's sole purpose.
Question: Is it possible to make the entire macro (or just UserForm2) run as if it was a separate application, so it appears in the Task Bar as a separate window, and not an internal form running inside Outlook?
The idea is not to run it independently of Outlook (or Excel), but to make them visible to external programs.
I tried a few options available on the Internet, but none of them work, and honestly I do not know where to begin, or how to circumvent it if it is not possible to do directly within the available API. Can you advise?

Launching VBA Applications blocks working with and opening other workbooks

I developed a vba application in excel for a company, They wants to leave it open the whole day until the end of work hours, while working normally on other excel workbooks.
The application is working just fine, no problem with the code.
My problem is that when the application is launched .. it blocks the other opened workbooks (I can't select cells or do anything).
And also If I try to open a sample excel file while the application is launched, it won't open.
(I tried with a simple userform and still the same problem, so the problem doesn't have anything to do with my application)
Is this something normal in Microsoft Excel, because I can't find anything on the net that is similar to my problem ?
Thanks in advance ..
Sounds as though you have a userform displayed modally (which is the default way of displaying a form). If you need to have the form displayed all the time you can display it modeless, but note that this does not work well with Excl's SDI implementation: you have to use Windows API calls to keep the form from being hidden. see http://www.jkp-ads.com/Articles/keepuserformontop01.asp
Alternatively you could change the design to use a ribbon command to display the form only when needed.

Display reports with non-modal messagebox

Am writing a VB.Net app written in VS2010. This displays some reports in several forms. (Am using Crystal Reports though this is incidental to the problem). The user needs to be able to check these, then confirm if he wishes to run the update process or abort.
My first idea was to ask the user to reply using a messagebox. But of course this is modal, so the user cannot browse through the reports.
I thought of other options but each seems to have problems:
- export the reports as PDFs, then display report in external Adobe Reader Window using System.Diagnostics.Process.Start("AcroRd32.exe", filename). This seems messy.
- create a non-modal message box or equivalent. This loses any concept of program flow, so am unconvinced by this
What ideas do you have please?
You should already be using a form to display the report(s). Put all the reports on the same form with scroll bars enabled and add a button to that form for the user to 'Update Process'.
You may come up with a better display based on how many reports you want the user to look at - like a drop down at the top with list of reports in it OR a radio button list on the left with reports listed etc.

Display HTML page in Office 2003 or 2007 task pane via VBA

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