Freelance Project Requests info@CodeDocu.de Software Development in C# WPF Asp.Net Core Vba Excel Word SQL-Server EF Linq, UWP Net
#

Download:

Datei 1: Word_vba_find_Sentence.docm

 
 
The following example shows how to find the current position in Word in MS Word vba.
This allows you to find the current block, paragraph, table, block, and mark, copy or delete it.
 
 
The current element is always searched via Selection.Range.InRange (..) Of the comprehensive element area

Selection.Range.InRange(OuterElement.Range)

 
 
 
As an example, the macro is started using Word macros.
You can run the macro: find_current_Sentence.

 
This is where you select the current sentence in which the Word cursor is currently located

 

Option Explicit On
 
Sub find_current_Sencence()
'< select current line >
Dim objParagraph As Paragraph
For Each objParagraph In ActiveDocument.Paragraphs
If Selection.Range.InRange(objParagraph.Range) Then
objParagraph.Range.Select
End If
Next
'Selection.Delete
'</ select current line >
End Sub
 

 
Mobile
vba
»
Vba Code: Copy template area
»
Vba Code: Platzhalter finden und ersetzen
»
Insert a line break at the end of a line and then insert text or a table
»
Word: insert characters at the end of a line
»
Text input fields in Word with vba c #
»
Create input fields in Word. C# ContentControls
»
Protect Word programmatically
»
Word vba: find current sentence
»
Word vba: Change document property title dynamically with Textbox Control
»
Word Code: Edit photos and controls in vba

.

Contact for Jobs, Project Requests: raimund.popp@microsoft-programmierer.de