Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 04-15-2016, 09:37 AM
gmaxey gmaxey is offline Find Bookmark, move to bookmark, execute code, repeat Windows 7 32bit Find Bookmark, move to bookmark, execute code, repeat Office 2010 (Version 14.0)
Expert
 
Join Date: May 2010
Location: Brasstown, NC
Posts: 1,652
gmaxey is just really nicegmaxey is just really nicegmaxey is just really nicegmaxey is just really nicegmaxey is just really nice
Default

Try adding ActiveDocument.Fields.Update at before the lbl_Exit line.
__________________
Greg Maxey
Please visit my web site at http://www.gregmaxey.com/
Reply With Quote
  #2  
Old 04-15-2016, 09:57 AM
raymm3852 raymm3852 is offline Find Bookmark, move to bookmark, execute code, repeat Windows 10 Find Bookmark, move to bookmark, execute code, repeat Office 2016
Novice
Find Bookmark, move to bookmark, execute code, repeat
 
Join Date: Apr 2016
Posts: 6
raymm3852 is on a distinguished road
Default

Thank you for your suggestion.

I copied ActiveDocument.Fields.Update and put it before the lbl_Exit line so the code was:

Dim oFld As Field
Dim oRng As Range
For Each oFld In ActiveDocument.Range.Fields
If oFld.Type = wdFieldAsk Then
If InStr(oFld.Code, "TranscriptPage") > 0 Then
Set oRng = oFld.Code
oRng.Collapse wdCollapseStart
oRng.Select
oFld.Update
End If
End If
Next
ActiveDocument.Fields.Update
lbl_Exit:
Exit Sub
End Sub

The bar at the bottom of the page still did not update to show the current page name.

Also the current document contains 7 instances of "TranscriptPage". The macro goes through the document once allowing me to enter the pages numbers, then the macro repeats showing the ASK box again, starting at the beginning, showing each sequentially to the last one.
Reply With Quote
Reply

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
Iterating through tables to find a bookmark bgmsd Word VBA 12 06-08-2015 10:09 AM
Find Bookmark, move to bookmark, execute code, repeat Bookmark Not Showing Bookmark RegAudit Word 6 03-16-2015 11:08 PM
Find Bookmark, move to bookmark, execute code, repeat Move shape to bookmark location Byron Polk Word VBA 4 08-07-2014 03:21 AM
vba to go to next bookmark megatronixs Word VBA 2 06-08-2014 09:53 PM
Find Bookmark, move to bookmark, execute code, repeat Find and Execute cksm4 Word VBA 1 10-22-2011 11:36 PM

Other Forums: Access Forums

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


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