Getting inner text for line break by class name - vba

See my screenshot:
In the pic, I am trying to retrieve the highlighted line but unable to do so.
Can someone help me with this and some vba code?

Related

Using VBA how to highlight row in SAP GUI

So in this screenshot I would like to do a line search to find a specific text which will be CON- from the "Mfr part number" column, once it finds it I would like for it to highlight the line. I am having a difficult time trying to figure which way to approach this. The line of code that does highlight the line is below. Any help would be greatly appreciated.
sapsession.findById("wnd[0]/usr/tabsTAXI_TABSTRIP_OVERVIEW/tabpT\01/ssubSUBSCREEN_BODY:SAPMV45A:4400/subSUBSCREEN_TC:SAPMV45A:4900/tblSAPMV45ATCTRL_U_ERF_AUFTRAG").getAbsoluteRow(2).Selected = True

VBA Macro for MS Word to Ignore Spelling Errors in Selected Block of Text

VBA Noob here. I take my python programming notes in a word document since I can import images into it and align/format text quickly. Any code pasted into this document comes up as a spelling error. I'm trying to find a way to ignore spelling errors within a selected text area so I don't have to deal with ignoring each spelling error line of code individually. I don't want to turn off spell check in the document.
Ideally, I'd able to write a macro that read:
Selection.ShowSpellingErrors = True
but ShowSpellingErrors() can only be used with ActiveDocument. I was able to a record a macro that ignored spelling errors with:
Selection.LanguageID = wdEnglishUS
Selection.NoProofing = True
However, any new text I type into this also doesn't get proofed, which is something I don't want. I want to be able to write new text and see any errors I make. Thanks for any help!
Not a VBA Macro, but I think this answer may be relevant to your problem anyway.
Try creating a style for code which does not include spell check. Anything with this style does not get spell checked, while the rest of the document does. Sometimes I find the code shows the red underline, but if you run spell check it should just disappear without needing to be 'fixed'.
Create a new style, in the modify formatting dialog, go to Format > Language:
Tick the 'Do not check spelling or grammar' checkbox:
Highlight your code and use the new style. Any text not in this style will still be spellchecked:

Systematically Hyperlinking text in Word VBA

I work for a company that does custom reports in Microsoft Word very frequently. I would like to write a VBA Macro that systematically goes through the following list and Hyperlinks ONLY the text (not paragraph symbols or tab arrows or list number) and links to a bookmark in the current document.
1 → Description of Figure 1 ¶
¶
2 → Description of Figure 2 ¶
¶
3 → Description of Figure 3 ¶
¶
4 → Description of Figure 5 ¶
¶
After the macro is complete, clicking on "Description of Figure 1" will go to bookmark Figure_01 which exists later in the same document. I appreciate any help that anyone can give!
We can't just go ahead and write it for you, that is not the nature of the site, however, I don't want to tell you to go off and come back with some more effort and we'll support that.
I want to provide some pointers for you to get you going. Once you have got so far but are getting stuck on specific issues (e.g. 'why do I get error X' or 'why is my loop not capturing everything'), that's the time this site will shine for you and give great support!
So where to start? I'm going to assume non VBA experience and the below a crash course.
First we need a procedure that we can run. In Word press Alt+F11, this opens the VBE (VBA-Editor)
From the project window on the top left side (usually) double click on 'ThisDocument' and the main window will become a space for us to write code. The first first thing to write at the very top is Option Explicit, this is telling the VBA runtime that all variables must be declared, which is good practice.
Next below that enter: -
Public Sub CreateLinks()
End Sub
You have now created a procedure called CreateLinks, while your insertion point (vertical blinking line) is between these two lines of code you can push F8 to step through code line by line, or F5 to run it all in one go.
That's the start of everything. Now what you need to do is.
Connect to the document
Find the text to link to
Find the text to link from
Create link
Repeat steps 2 - 5 until all links are done.
That should bring you to your answer.
As further pointers/hints to help you: -
The Application holds a collection of documents, you could look through them or open your document to connect to it
a Document has a collection of bookmarks and hyperlinks, you can loop through these while getting to your goal
Selection is that active selected text
I hope this is of help.

VBA to get HTML text

I've got VBA to open an IE page and nagivate to its results page. What I want to do now is to copy the results of the page back to Excel.
Here is the HTML from which I want to get a result:
I want to be able to get the $505 which you can see after class "frequencyAmount"
I've been using variations of the following code with no luck (it executes but no value is pasted into Excel):
Cells(1, 22).Value = IE.Document.getElementByID("result-row0").getElementsByClassName("frequencyAmount").outerText
Any help would be greatly appreciated

Microsoft Excel Search Engine - Hyperlink Results Provides Error Message

I've been trying for two days to figure out this problem.
I have created an Excel search engine to search through a database of hyperlinks in the same worksheet. I want the results to display working hyperlinks, but right now it just displays the text. When the hyperlink is clicked, I get an error message - "Cannot open the specified file."
Can someone please help me. I've tried multiple codes including the following:
=HYPERLINK("#"&VLOOKUP(D5,A2:C91,3,FALSE),""""))) to no avail.
I can also email the spreadsheet if a email is provided. Thank you!
A hyperlink cannot start with the # sign. If the link is to a file, then you need to start with the file path, like shown in the Excel help
=HYPERLINK("D:\FINANCE\1stqtr.xlsx", H10)
If the link goes to another sheet in the same file, use
=HYPERLINK("[Budget.xlsx]E56", E56)
The Vlookup will need to return the correct file path or a valid URL, including the "http://"