View Single Post
 
Old 03-06-2020, 12:08 AM
macropod's Avatar
macropod macropod is offline Windows 7 64bit Office 2010 32bit
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

The code I supplied is a complete unit - you can't just take part of it and paste it into your own code. The error you're now getting suggests your paragraph 17 is empty. In other words, you've specified the wrong paragraph. Check what paragraph:
Set wdRng = .Paragraphs(17).Range
actually points to. For example:
Set wdRng = .Paragraphs(17).Range
MsgBox wdRng.Text
Exit Sub
Does the message box give the expected text?
Quote:
Originally Posted by SamDsouza View Post
unfortunately the full structure has been modified with your coding. as in your coding the missing part is from txtHeader as per#1.
Not if you use the entire code I posted...
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote