View Single Post
 
Old 01-20-2021, 03:09 AM
macropod's Avatar
macropod macropod is offline Windows 10 Office 2016
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 21,963
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
What is the reason that this time your refined codes worked properly without any issues ?
Mainly that the first Find/Replace in the new code fixes an issue with the paragraph breaks in the text file.

Quote:
Originally Posted by SMehta View Post
Your Demo1 procedure pastes the full text file in Word document
Correct - which is as I originally described.
Quote:
Originally Posted by SMehta View Post
Procedure changed from Demo to Demo4
The below code pastes the 2nd paragraph from 1st Blank line uptil the first blank line
after the 2 paragraph or after lines representing as 2nd paragrpah in notepad.
Correct.
Quote:
Originally Posted by SMehta View Post
Now I would like if i put values in following Textboxes From_Blank Line.Text and in To_BlankLine.Text to get the following text Pasted
From_Blank Line.Text = 10
To_BlankLine.Text = 14
It's still not clear what the rules are for what gets pasted where. Your Sample.txt file has 7 paragraphs, whilst your Sample2.txt file has 15 groups of 5 paragraphs.

For your Sample2.txt file, what are the rules for which blocks from get copied and what are the rules for where those blocks get inserted into your Sample.txt file?
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote