Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 10-20-2019, 11:14 PM
Ludo_Soete Ludo_Soete is offline Underline word(s) over the whole page width using VBA Windows 7 64bit Underline word(s) over the whole page width using VBA Office 2010
Novice
Underline word(s) over the whole page width using VBA
 
Join Date: Oct 2019
Posts: 2
Ludo_Soete is on a distinguished road
Angry Underline word(s) over the whole page width using VBA

Hi,

If i type a word, or words, followed by a CR LF, followed by 3 consecutive underline characters, then is the result a full line under the typed word(s) stretching from the left side of the page to the right side of the page - see picture on the bottom of the message.
This is not the same as underlining the word(s), the line spacing is also different as you can see in the picture.

I would like to obtain this using VBA, but I'm not lucky at all.
I record a macro, see code below, but this is only placing the 3 underline characters on a new line, not what I expected.

How can this be done?
I'm new with Word & VBA for Word, no experience at all.

Ludo

Code:
Sub Macro8()
'
' Macro8 Macro
'
'
    Selection.TypeText Text:="titel"
    Selection.TypeParagraph
    Selection.TypeText Text:="___"
    Selection.TypeParagraph
End Sub

Attached Images
File Type: png Word Title Underline.png (3.5 KB, 17 views)
Reply With Quote
 



Similar Threads
Thread Thread Starter Forum Replies Last Post
How to adapt a text pasted from PDF to the full width of a microsoft word page Alessio Word 2 01-13-2018 03:35 PM
Underline word(s) over the whole page width using VBA Underline at bottom of page won't go away yachts66 Word 3 08-13-2014 07:28 AM
Underline word(s) over the whole page width using VBA How do you delete the UNDERLINE from a Title that remains on The previous page. Dane_s_13 Word 4 02-20-2013 04:55 PM
Underline word(s) over the whole page width using VBA Word 2012: Change column width changes table width OpfinnarJocke Word Tables 1 09-22-2012 04:03 AM
Underline word(s) over the whole page width using VBA Word is inserting bold page-width lines without permission! kozureokami Word 6 05-22-2011 02:59 PM

Other Forums: Access Forums

All times are GMT -7. The time now is 01:35 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft