Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 05-05-2023, 01:15 AM
syl3786 syl3786 is offline VBA copy issues Windows 10 VBA copy issues Office 2019
Advanced Beginner
VBA copy issues
 
Join Date: Jan 2023
Posts: 97
syl3786 is on a distinguished road
Default

Quote:
Originally Posted by Guessed View Post
Oops, my bad. I didn't read beyond your code.

Your code is finding a string from the list. When it finds that string, it appears you want to report that value (which you already had anyway). It would make more sense if it actually looked to the right of the found string to return the value of the text sitting beside that found string (or returned the contents of the whole paragraph).

Neither of the Excel workbooks look like they match the concept of list.xlsx. I was expecting a list of user names in that. Your code then loops through each list item finding hits before moving on to a next list item. This will harvest the data in unrelated order - for instance your outcome doc shows an order like
CEO, Oliver, CEO, Ethan, CEO, Amelia, ...
but your code is structured to return


CEO, CEO, CEO, ..., Oliver, Ethan, Amelia, ...
Why would that be a useful output?

I'm looking at the contents of the Word file and in my mind, aligning it with your outcome workbook and think perhaps the list and the search is a pointless distraction. To me it appears you want the dialog transferred in the correct order into Excel and separate the speaker from the dialog by putting each into two separate columns. If this is the case, what is the point of searching for list items unless you want to exclude specific speakers?

Your word doc shows xxx against each name. Your Excel workbook shows headings of Name & URL. Is each piece of text beside a name a URL or a string of text?
May I ask if you could help edit the codes? I am still new to VBA. I beg you on bended knee on that. Please
Reply With Quote
Reply



Similar Threads
Thread Thread Starter Forum Replies Last Post
VBA Copy Text issues syl3786 Word VBA 5 04-17-2023 08:44 PM
Issues with a copy of a Contents Table! KirstyAmanda Word 2 07-20-2020 02:51 PM
VBA copy issues Font issues when copy content from MS Word. ArchanaV Word 3 06-29-2016 01:02 PM
Page Up & Copy/Paste Issues weamish Word 10 02-01-2014 08:25 PM
VBA copy issues Copy and Paste issues in Outlook 2007 Oncilla Outlook 6 12-13-2010 01:00 PM

Other Forums: Access Forums

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