Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 04-17-2023, 01:46 AM
gmayor's Avatar
gmayor gmayor is offline VBA Copy Text issues Windows 10 VBA Copy Text issues Office 2019
Expert
 
Join Date: Aug 2014
Posts: 4,144
gmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud of
Default

You have a mix-up with missing variables and incorrect variable types.
Note that it is good practice to add Option Explicit to the top of your modules, which will make it easier to spot such issues.
Your code doesn't read values from either workbook for use in the search. You need to read the values from the worksheet you want to reference into an array in place of the fixed array in the code at
https://www.msofficeforums.com/word-...ding-list.html then loop through the values. I posted code showing how to do this at https://www.msofficeforums.com/word-...ont-style.html
__________________
Graham Mayor - MS MVP (Word) (2002-2019)
Visit my web site for more programming tips and ready made processes www.gmayor.com
Reply With Quote
  #2  
Old 04-17-2023, 02:26 AM
syl3786 syl3786 is offline VBA Copy Text issues Windows 10 VBA Copy Text issues Office 2019
Advanced Beginner
VBA Copy Text issues
 
Join Date: Jan 2023
Posts: 97
syl3786 is on a distinguished road
Default

Quote:
Originally Posted by gmayor View Post
You have a mix-up with missing variables and incorrect variable types.
Note that it is good practice to add Option Explicit to the top of your modules, which will make it easier to spot such issues.
Your code doesn't read values from either workbook for use in the search. You need to read the values from the worksheet you want to reference into an array in place of the fixed array in the code at
https://www.msofficeforums.com/word-...ding-list.html then loop through the values. I posted code showing how to do this at https://www.msofficeforums.com/word-...ont-style.html
Thanks for your reply. But the second link is related to mailmerge hyperlinks, not copy text...... may i aks if you can provide the URL?
Reply With Quote
Reply

Tags
copy text, vba word to excel



Similar Threads
Thread Thread Starter Forum Replies Last Post
Issues with a copy of a Contents Table! KirstyAmanda Word 2 07-20-2020 02:51 PM
VBA Copy Text issues Font issues when copy content from MS Word. ArchanaV Word 3 06-29-2016 01:02 PM
Issues with text in circle shapes that I am having damefrombrum Word 0 12-01-2015 08:05 PM
Page Up & Copy/Paste Issues weamish Word 10 02-01-2014 08:25 PM
VBA Copy Text 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 02:55 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