Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 07-04-2011, 08:26 AM
suerose suerose is offline Creating a generic macro? Windows 7 32bit Creating a generic macro? Office 2003
Novice
Creating a generic macro?
 
Join Date: Jul 2011
Posts: 1
suerose is on a distinguished road
Question Creating a generic macro?


Does anyone know how to create a macro that will copy whatever paragraph the cursor is placed in front of to another document? I can create one that copies specific paras, but I need one that will copy whatever is in front of the cursor with just one command. Is it possible? Thanks
Reply With Quote
  #2  
Old 07-04-2011, 07:42 PM
macropod's Avatar
macropod macropod is offline Creating a generic macro? Windows 7 64bit Creating a generic macro? Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 21,963
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

Hi suerose,

The code to copy the current paragraph, regarless of where the cursor is in it, is:
Selection.Paragraphs.First.Range.Copy
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
  #3  
Old 07-04-2011, 07:59 PM
macropod's Avatar
macropod macropod is offline Creating a generic macro? Windows 7 64bit Creating a generic macro? Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 21,963
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

Cross-posted at: http://answers.microsoft.com/en-us/o...c-5b6fd3e3cbc9 (It seems I wasted time answering a question that's already been answered there).

For cross-posting etiquette, please read: http://www.excelguru.ca/node/7
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
Reply

Tags
generic, macro



Similar Threads
Thread Thread Starter Forum Replies Last Post
Creating a generic macro? Creating macro to convert/print to pdf shabbaranks Word 3 05-18-2011 08:59 AM
Creating a generic macro? creating macro for biffurcation in sheets according to data. Nirik Excel Programming 8 05-07-2011 05:11 AM
Creating a MACRO Nikb3522 Word VBA 0 10-21-2010 05:55 PM
creating macro steveb Word VBA 0 08-14-2010 01:29 AM
Weird problem with generic file icons in Office 2K bankboysb Office 0 01-23-2006 02:10 PM

Other Forums: Access Forums

All times are GMT -7. The time now is 07:24 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2024 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft