Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #6  
Old 01-17-2021, 09:53 PM
macropod's Avatar
macropod macropod is offline Notepad to Word : Pasting Specific text ie between any two blank line from notepad to word Windows 10 Notepad to Word : Pasting Specific text ie between any two blank line from notepad to word Office 2016
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 22,467
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

Quote:
Originally Posted by SMehta View Post
Sir if i may ask what does the following mean

in Demo 1
Code:
  .Text = "[^13]{2,}"
  .Replacement.Text = "^p"
in Demo 2
Code:
  .Text = "[^13]{2}[!^13]*[^13]{2}"
  .Replacement.Text = "^p"
Those are standard Word wildcard Find/Replace expressions. See: Finding and replacing characters using wildcards
Quote:
Originally Posted by SMehta View Post
To check i inserted the both Demos in Module and ran the macro for Demo 1
i got following the error "438" Object doesnt suport this property at

DocTgt.Range.Characters.Last.Text = .Text
My bad. I omitted .Range from that line. Code fixed.
Quote:
Originally Posted by SMehta View Post
Something happened surprisingly when
I ran Demo 2
Everything disappeared from VBA programming enviornment Coding Editor
it just displayed Microsoft Visual Basic for Application - Sample
and main document White Page from word was also not seen
In both sets of code, the source document isn't visible while being processed. Everything should return to normal once the macro has finished executing.
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
 



Similar Threads
Thread Thread Starter Forum Replies Last Post
Need help to get data from notepad to word ganesang Word VBA 2 08-11-2019 10:21 PM
Word does not stop at the set tab, but it keeps forever on the same line like it would in Notepad. danvina@gmail.com Word 2 01-16-2019 02:33 PM
Notepad to Word : Pasting Specific text ie between any two blank line from notepad to word Microsoft notepad over word for saving important text files Noclip1 Word 1 10-25-2017 10:55 PM
Notepad to Word : Pasting Specific text ie between any two blank line from notepad to word Copy text with tab at start of line and paste to Notepad JohnTurnbull Word 5 08-27-2017 11:17 PM
Notepad to Word : Pasting Specific text ie between any two blank line from notepad to word Sr. Citizen Question, Please: WORD Shows Blank, But Notepad Shows "Gibberish" ? Robert11 Word 3 08-12-2013 12:35 PM

Other Forums: Access Forums

All times are GMT -7. The time now is 07:52 AM.


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