Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #5  
Old 03-09-2022, 11:46 PM
Guessed's Avatar
Guessed Guessed is offline Word save in folder bookmark Windows 10 Word save in folder bookmark Office 2016
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

You don't need to loop through bookmarks to see if it exists
Code:
Sub TestBookmark()
  Dim oBM As Bookmark
  If ActiveDocument.Bookmarks.Exists("code") Then
    Set oBM = ActiveDocument.Bookmarks("code")
    MsgBox oBM.Range.Text
  Else
    MsgBox "This bookmark doesn't exist" & vbCr & "code"
  End If
End Sub
__________________
Andrew Lockton
Chrysalis Design, Melbourne Australia
Reply With Quote
 



Similar Threads
Thread Thread Starter Forum Replies Last Post
Can't save Word 2019 doc to original folder - can you help please? frustratedphil Word 1 01-06-2019 11:11 AM
Word save in folder bookmark Save all docs to pdf in specified folder loki005 Word VBA 4 10-25-2018 02:18 PM
macro to save as pdf with name from bookmark pamtupac Word VBA 3 06-06-2017 08:23 PM
Word save in folder bookmark Macro to save as pdf with ability to choose save as folder rvessio Word VBA 4 07-25-2016 12:37 PM
Word save in folder bookmark Default Save AS File Name from Bookmark xscotsmanx Word VBA 1 07-17-2011 12:23 AM

Other Forums: Access Forums

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