Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 04-09-2018, 09:01 AM
brent chadwick brent chadwick is offline Cursor not showing up when running footnote macro Windows 8 Cursor not showing up when running footnote macro Office 2013
Advanced Beginner
Cursor not showing up when running footnote macro
 
Join Date: Mar 2015
Posts: 76
brent chadwick is on a distinguished road
Default Cursor not showing up when running footnote macro

Hey guys,
I've been using this macro forever in Mac 2011 to insert specific formatted footnotes. It does not work properly in Mac 2016 when I run the macro with a keyboard shortcut-the cursor does not show up anywhere until you click the page somewhere. However when you run the macro from the visual editor it works like it should. Here's the code-




Code:
Sub InsertFootnote()
ActiveDocument.Footnotes.Add Range:=Selection.Range
With Selection
   .Paragraphs(1).Range.Font.Reset
   .Paragraphs(1).Range.Characters(2) = ""
   .InsertAfter ". " & vbTab
   .Collapse wdCollapseEnd
   Selection.MoveLeft Unit:=wdCharacter, Count:=4
   Selection.TypeText Text:=vbTab
  Selection.MoveRight Unit:=wdCharacter, Count:=4
End With
End Sub
Ideas?
Reply With Quote
  #2  
Old 04-09-2018, 02:48 PM
macropod's Avatar
macropod macropod is offline Cursor not showing up when running footnote macro Windows 7 64bit Cursor not showing up when running footnote macro Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 20,451
macropod has a brilliant futuremacropod has a brilliant futuremacropod has a brilliant futuremacropod has a brilliant futuremacropod has a brilliant futuremacropod has a brilliant futuremacropod has a brilliant futuremacropod has a brilliant futuremacropod has a brilliant futuremacropod has a brilliant futuremacropod has a brilliant future
Default

With the code you're using, the insertion point should show up in the footnote, not in "the page somewhere". Try:
Code:
Sub InsertFootnote()
ActiveDocument.Footnotes.Add Range:=Selection.Range
With Selection.Paragraphs.Last.Range
   .Font.Reset
   .Characters.Last.Previous.Text = ". " & vbTab
   .Characters.Last.Previous.Select
End With
Selection.Collapse wdCollapseEnd
End Sub
Instead of starting each footnote with a tab character before the reference, you really should do a one-off modification of the 'Footnote Text' Style to give it a first-line indent.
__________________
Cheers,
Paul Edstein
[MS MVP - Word]
Reply With Quote
  #3  
Old 04-09-2018, 05:42 PM
brent chadwick brent chadwick is offline Cursor not showing up when running footnote macro Windows 8 Cursor not showing up when running footnote macro Office 2013
Advanced Beginner
Cursor not showing up when running footnote macro
 
Join Date: Mar 2015
Posts: 76
brent chadwick is on a distinguished road
Default

Thanks Paul, always something to learn from the master. It still does the same thing with the new code. I'm thinking that this is a bug in the Mac 2016 version. When you run the code from within the visual editor it works like it always does-the cursor flashes at the point of typing in the footnote area. Not so when you use a keyboard shortcut, the cursor appears nowhere, you have to click on the doc somewhere. I'll have to get in touch with MS.
P.S. When I run either code in Windows 7 or 8 with Word 2010 or 2013 it works like it should. Weird-
Reply With Quote
Reply

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
Cursor not showing up when running footnote macro Footnote extraction macro [Why is this macro so slow? / anyway to make it faster?] Le_Blanc Word VBA 12 06-14-2020 04:16 PM
Macro not running on exiting legacy drop down menu. supremegrandruler Word VBA 5 12-11-2014 11:14 PM
issue in running macro in mac expert4knowledge Word VBA 5 08-13-2014 02:33 PM
Macro to find text only footnote numbers TimFromPhx Word VBA 7 04-10-2014 07:05 PM
Cursor not showing up when running footnote macro Running a Macro in a protected form yessmarie Word VBA 1 05-25-2012 12:04 AM

Other Forums: Access Forums - Senior Forums

All times are GMT -7. The time now is 04:04 AM.


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