![]() |
|
|
|
#1
|
||||
|
||||
|
Quote:
Sorry, I didn't say where to put it. Where you did, is perfect. Cause at times, I've already fixed lot's of stuff already in a document that had text boxes. So when I encounter another situation in the same document, I didn't want the new textbox to affect all the others that I've fixed. Would it be complicated to add, that text box that has been extracted, to be deleted? I could always do it manually, but I was wondering if it's a challenge? Regardless, thank you soooooooooo much. Cendrinne |
|
#2
|
||||
|
||||
|
It's good to know, I have a choice to delete it or not.
I've added this script below, a line after, .End if HTML Code:
Selection.ShapeRange(1).Delete HTML Code:
Sub Gettext()
'Helped by Guessed (Andrew Lockton), from the MS office Word forum on 2021-11-14
Dim aShp As Shape, aRng As range
If Selection.ShapeRange.Count > 0 Then
Set aShp = Selection.ShapeRange(1)
Debug.Print aShp.TextFrame.TextRange.Text
Set aRng = aShp.Anchor
aRng.Collapse Direction:=wdCollapseStart
aRng.FormattedText = aShp.TextFrame.TextRange.FormattedText
End If
Selection.ShapeRange(1).Delete
End Sub
I have to open a new thread for something else, I can't figure out. Remove the default marging in a textbox. Cendrinne |
|
| Tags |
| extracting data, help please, textbox |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Log file extraction | xendistar | Excel | 0 | 09-01-2016 02:08 PM |
| wrapping text around a picture within a textbox | ketanco | Word | 3 | 04-06-2016 11:07 AM |
Data extraction from a cell!
|
JTevez | Excel | 2 | 10-14-2015 11:56 PM |
Display result in textbox based on the input of another textbox
|
scarymovie | Word VBA | 5 | 05-16-2012 07:05 PM |
Email Extraction
|
dpad | Outlook | 1 | 08-17-2010 06:01 PM |