Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #4  
Old 04-05-2011, 08:23 PM
macropod's Avatar
macropod macropod is offline Right click in Macro Windows 7 32bit Right click in Macro Office 2000
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 22,515
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 M Schroff,

I don't really understand why you want a sub with the right-click approach, when you could use a sub like:
Code:
Sub Demo()
Selection.Range.CheckSpelling
End Sub
The Sendkeys code is what you'd add to a sub to simulate the right-click after something has been selected (either by the user before running the sub or by the sub itself). For example:
Code:
Sub Demo()
Dim StrWrd As Range
For Each StrWrd In ActiveDocument.Paragraphs(1).Range.Words
  With StrWrd
    If .SpellingErrors.Count > 0 Then
      .Select
      SendKeys "+{F10}", True
      Exit Sub
    End If
  End With
Next
End Sub
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
 



Similar Threads
Thread Thread Starter Forum Replies Last Post
Right click in Macro Alter right click menu? markg2 Office 1 01-10-2011 08:10 AM
Click -to run headache lazarus34 Office 0 09-14-2010 08:42 AM
Right click in Macro Can't click on links in email MrJP Outlook 1 08-28-2010 06:39 PM
What is this right-click sub-menu called? wornways Word 3 08-13-2010 09:17 PM
Right click in Macro My Subforms jump when I click the tab jbryanh Office 1 10-13-2005 07:12 AM

Other Forums: Access Forums

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