Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 11-23-2021, 02:36 PM
Guessed's Avatar
Guessed Guessed is offline Would Like to test if Full Name is NOT Present in document Windows 10 Would Like to test if Full Name is NOT Present in document Office 2016
Expert
 
Join Date: Mar 2010
Location: Canberra/Melbourne Australia
Posts: 4,187
Guessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant future
Default


There is always a fullname but if a file is new and has never been saved then there won't be a path.
Code:
Sub SavedNotSaved()
  If ActiveDocument.Path = "" Then    'file is new and not saved with filename
    Debug.Print "New unsaved doc"
  Else
    Debug.Print "It's been saved"
  End If
End Sub
In an unsaved document, fullname returns the name in the banner eg Document1
__________________
Andrew Lockton
Chrysalis Design, Melbourne Australia
Reply With Quote
  #2  
Old 11-23-2021, 04:48 PM
Stephen Ray Stephen Ray is offline Would Like to test if Full Name is NOT Present in document Windows 10 Would Like to test if Full Name is NOT Present in document Office 2016
Advanced Beginner
Would Like to test if Full Name is NOT Present in document
 
Join Date: Sep 2018
Location: Kansas
Posts: 34
Stephen Ray is on a distinguished road
Default

Guessed, Thank you for your reply. But this document is not saved anywhere, it comes from an application that I work with; the original input document that is not in Word Format. I copy the whole enchilada - original information by highlighting it and Cntrl + C.
With all the information in the clipboard, I turn to a second monitor where Microsoft Word is waiting. I immediately start a macro which pastes all the information and arranges it in a Word document. The Macro saves lots of time and effort by re-arranging it all.

But I need to be able to test when the full name is present or not.

I thought I would highlight and SELECT the area where the Full Name is supposed to be. (The VBA MACRO can easily highlight and SELECT the area where the Full Name is supposed to be). If I could test the SELECTION for Alpha or Alphanumeric that would work.

But from my searching there is only a ISNUMERIC. There is no ISALPHANUMERIC test.
Reply With Quote
Reply



Similar Threads
Thread Thread Starter Forum Replies Last Post
Would Like to test if Full Name is NOT Present in document Creating a full page document from a ragged one. Balliol Word 5 04-28-2021 07:46 PM
Full screen view to specific document matapagi2019 Word VBA 0 03-17-2019 10:42 AM
Detecting that previous character doesn't exist (i.e., present character is first in document) Robert K S Word VBA 15 08-01-2016 09:33 AM
Would Like to test if Full Name is NOT Present in document Master document missing images present in Subdocument Dart82 Word 2 05-05-2014 08:35 AM
how to add test in word document tekle Word 2 05-24-2010 01:26 PM

Other Forums: Access Forums

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