Copying text from popup window - vba

My employer uses SAP to generate purchase order numbers. The PO number is displayed in a popup window. I need to use a VBA script to copy the PO number (or the whole text) so that it can be pasted into Excel.
I have tried using the script recording tool to get the command (it doesn't record the mouse clicks to select and copy, nor the keyboard commands), and it won't let me print to One Note or Microsoft XPS Document Writer.
Any suggestions would be greatly appreciated. Image of the popup window is here:

The message is displayed in the status bar at the lower end of the screen.
with VBA you can read this as follows:
STATUS_BAR_TEXT = session.findById("wnd[0]/sbar").Text

Related

How to get text from status bar in SAP GUI

I'm tying to automate a certain process in SAP GUI. But I can't get the script this specific part.
It reads until I double click in this field shown in color green.
After that the following window is opened:
How do I get this number in VBA? Any ideas?

How can taking Print Screen with VBA?

(I)
I need prepare print screen, with VBA. Are there any function for do that?
I tried record macro in MS-Word and MS-Excel, but nothing recorded when pressing Print Screen key.
Only .Paste method was recorded.
(II)
How can Print Screen minimized window? (since Windows task-bar can create a preview of a window even if it is minimized? Effecting this question for C#) , by VBA
(III)
How can I assign above copied picture by PrtSc that was stored in clipboard, to Picture property of Image control in User-form?

Add a button to Word 2010 for a macro at document level, not installation level

I created a macro for a document. I want a button so that anyone can run the macro easily.
I only want the button to appear on that document, and when I share the document the button appears.
I tried using the built-in File -> Options method to add the button, but the result is that
a) the button isn't shown when I send the document to others
b) it appears when I open any Word document
With the code in "ThisDocument" you can add a "button" to the document rather than the ribbon.
http://wordribbon.tips.net/T008658_Assigning_a_Macro_to_a_Button_in_Your_Text.html
"This is all instituted through the use of a field code.
It may be a bit of a misnomer to refer to the result of this field code as a "button," because no graphics are involved whatsoever, although you can create your own graphic and embed it into the field.
The syntax for the field code is: MacroButton MacroName Display"
If the final document should not have a button, you could revise the code to first generate a new document without the button.

Modifications to VB.NET PDF Viewer

Okay, I know a question LIKE this has been asked before, but none of them covered this certain toolbar. After the top and left toolbars are hidden, this little black window shows up near the bottom of the screen which allows the user to print, save, zoom, etc. They can also even open the top and left toolbars back up by clicking the Adobe logo.
As you can see, at the top of my program I have a toolbar of my own. The way my program works is a user will input data, press the 'Create Report' button and this Report Viewer window will popup. When the user Creates a Report a .PDF file named preview.pdf is created and that's what the user opens up. If the user doesn't like the report he can hit the X to delete it, or if he likes it he can type a File Name and Press Save. Or he can skip the saving and just print it. When the user saves the file it goes to a place that the software can retrieve at a later time. If the user presses the save button on one of the Adobe toolbars he has the option to save it where they want to. I can't have that.
Does anybody know how to disable ALL Adobe toolbars in the .NET PDF Viewer? (And yes, I know that Pressing F8 will bring them back up).
Here's the code I have now:
pdf.src = "C:\Users\Ryan\Desktop\HelloWorld.pdf"
pdf.setShowToolbar(False)
pdf.setView("fitH")
pdf.setLayoutMode("SinglePage")
pdf.setShowScrollbars(False)
pdf.setZoom(68)
Here's a screenshot of the Windows Form:
Acrobat viewer has such switchable options.
this configuration switchs off all navigation:
view=FitH
scrollbar = 0
toolbar= 0
statusbar= 0
messages= 0
navpanes= 0

Dreamweaver DOM getCurrentLine()

I'm currently trying to create a small panel extension that recreates the 'minimap' feature on the Sublime Text 2 code editor, but for Dreamweaver. I've successfully created the view but I want to click anywhere in the minimap and the current page will scroll down to the current line that was clicked.
Unfortunately, I can only find the 'getCurrentLines()' code function for the Dreamweaver DOM that returns character offsets rather that line numbers. Does anyone know how I can return the current line number from the document?
I can scroll down the user document by hard-coding a value in using the theDOM.source.setCurrentLine(200); code, but it's getting that number which is stumping me! Any help is much appreciated.
There is dom.getLineFromOffset() can take one of the offsets and find the associated line, however, that should work only in the document window, not sure if that will assist in taking a selection in this "view" (by which I assume you mean panel) to move that into the document being edited.