Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #5  
Old 09-03-2015, 07:44 PM
Guessed's Avatar
Guessed Guessed is offline Problems with Macros in MSW2010 vs 2003 Windows 7 32bit Problems with Macros in MSW2010 vs 2003 Office 2010 32bit
Expert
 
Join Date: Mar 2010
Location: Canberra/Melbourne Australia
Posts: 4,185
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

Writing VBA code is no different between those versions of Word. I can't see anything in your provided code that would act differently on versions of Word from 2003 to 2013. However, you could certainly improve the code to make it much clearer what is going on.

I suspect the problem you are seeing is because you are running the find and not actually testing to see whether it found anything (and moved the selection as a result) before doing the second part of the macro. Then the subsequent code would give wildly different results depending on the content above the found text (eg moving by two lines is different to moving by two paragraphs). If you test the macro on different files you will get different results but the version of Word appears irrelevant to your issue.

Perhaps you should explain what you want the macro to do so we can provide handwritten code that is a lot more error tolerant than what you recorded. You say you want to add the time but your code doesn't do that.
__________________
Andrew Lockton
Chrysalis Design, Melbourne Australia
Reply With Quote
 



Similar Threads
Thread Thread Starter Forum Replies Last Post
Problems with Macros in MSW2010 vs 2003 Word 2003 is getting problems - funny characters on the screen that do not print skkuchipudi Word 4 10-28-2015 09:18 AM
Problems with Macros in MSW2010 vs 2003 Word 2013 problems with the Macros boki_s78 Word VBA 3 04-23-2014 03:30 AM
Problems with Macros in MSW2010 vs 2003 Problems with Recording Macros jekronenfeld Excel 6 09-26-2013 03:07 PM
Problems with Macros in MSW2010 vs 2003 Copy Macros from Word 2003 - Word 2007 ballj_35 Word VBA 7 05-05-2011 12:37 AM
Excel 2003 SP3 bug when running Macros EnricoVenturi Excel 0 09-06-2009 08:11 AM

Other Forums: Access Forums

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