Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 09-27-2022, 05:52 AM
Stephen Ray Stephen Ray is offline Range For Last Line/Paragraph - To Find Date Windows 10 Range For Last Line/Paragraph - To Find Date Office 2016
Advanced Beginner
Range For Last Line/Paragraph - To Find Date
 
Join Date: Sep 2018
Location: Kansas
Posts: 34
Stephen Ray is on a distinguished road
Default

Macropod, Thank you for your reply. I will try your code.
And I see now that I was inserting stuff after the defined range.


I will go experiment with all this until I get the results I want.

But I have a question, If the text is this:
XXXX action taken by XXX personnel.
Active Directory Record already enabled. No Action Taken by XXX Personnel.
User has been updated in the Remedy System
Start Date & Time 9/22/2022 10:36:45 AM

And with the code: Set oRng = ActiveDocument.Paragraphs.Last.Range

The contents of oRng = Start Date & Time 9/22/2022 10:36:45 AM

Is that right?
Reply With Quote
  #2  
Old 09-27-2022, 04:21 PM
macropod's Avatar
macropod macropod is offline Range For Last Line/Paragraph - To Find Date Windows 10 Range For Last Line/Paragraph - To Find Date 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 Stephen Ray View Post
I have a question, If the text is this:
XXXX action taken by XXX personnel.
Active Directory Record already enabled. No Action Taken by XXX Personnel.
User has been updated in the Remedy System
Start Date & Time 9/22/2022 10:36:45 AM

And with the code: Set oRng = ActiveDocument.Paragraphs.Last.Range

The contents of oRng = Start Date & Time 9/22/2022 10:36:45 AM

Is that right?
When it is set, yes.
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
Reply



Similar Threads
Thread Thread Starter Forum Replies Last Post
Range For Last Line/Paragraph - To Find Date Find and replace only paragraph marks in blank line laith93 Word 4 04-27-2022 12:18 PM
Range For Last Line/Paragraph - To Find Date How to resize a paragraph range to include just a single line of text Peterson Word VBA 5 07-08-2019 04:36 PM
Using DateValue to find if a date exists within a certain range OfficeAssociate99 Excel Programming 3 07-13-2017 11:06 AM
Range For Last Line/Paragraph - To Find Date Find if Date range falls within another range Triadragon Excel 3 05-02-2016 11:48 AM
Find a Date in a Range rspiet Excel 3 02-15-2016 08:37 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 09:19 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