Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 11-29-2016, 08:51 AM
macropod's Avatar
macropod macropod is offline Newb needing VBA solution to change formatting Windows 7 64bit Newb needing VBA solution to change formatting Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 22,467
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

If you delete bookmarks, any cross-references to them will break. If you're starting off with a document using the correct font settings, per their Style definitions, there shouldn't be any need to mess with them afterwards. The problems you're having with things reverting to gray/Calibri suggests the Style definitions that exist in the document have been overridden with hard formatting. That's just asking for trouble.

To understand Styles, see:
http://shaunakelly.com/word/styles/stylesms.html


http://www.shaunakelly.com/word/styl...sonstyles.html
http://www.addbalance.com/usersguide/styles.htm
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
  #2  
Old 12-05-2016, 01:40 PM
derekcentrico derekcentrico is offline Newb needing VBA solution to change formatting Windows 7 Newb needing VBA solution to change formatting Office 2010 (Version 14.0)
Novice
Newb needing VBA solution to change formatting
 
Join Date: Jul 2010
Posts: 6
derekcentrico is on a distinguished road
Default

Thanks for that info. I got most of the styles working in the document (woo-hoo).

However, another problem reared its ugly head.

I have 27 fields that repeat throughout 15 pages. I created a table on the first page to input the data. The table uses bookmarks and cross-references to the bookmarks to populate the fields.

I used the code discussed above, and again here, to remove the bookmarks so I could delete the input page before saving the final document.

Unfortunately, without the bookmarks data seems to be lost when clicking Print. It saves fine. But, it changes to "Error! Reference source not found" when printing. Everything changes to that.

Code used:
Code:
Sub removebookmarks()
Dim bkm As Bookmark
For Each bkm In ActiveDocument.Bookmarks
bkm.Delete
Next bkm
End Sub
Any thoughts on a way to convert so I don't lose all the final data? The bookmarks save me like 2 hours building the documents literally. But this part is a real downer because I have to have it saved for later use/review without my table.
Reply With Quote
  #3  
Old 12-05-2016, 03:56 PM
macropod's Avatar
macropod macropod is offline Newb needing VBA solution to change formatting Windows 7 64bit Newb needing VBA solution to change formatting Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 22,467
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

Quote:
Originally Posted by derekcentrico View Post
However, another problem reared its ugly head.

...

I used the code discussed above, and again here, to remove the bookmarks so I could delete the input page before saving the final document.

Unfortunately, without the bookmarks data seems to be lost when clicking Print. It saves fine. But, it changes to "Error! Reference source not found" when printing. Everything changes to that.
Well, I did warn you:
Quote:
Originally Posted by macropod View Post
If you delete bookmarks, any cross-references to them will break.
Yes, there are ways around this but, frankly, I can't see what is achieved by deleting the bookmarks. Why not just leave them there and save your self the grief???
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
Reply

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
Newb needing VBA solution to change formatting newb - search and replace - WILDCARDS - keep original...? Bansaw Word 4 09-01-2016 11:16 AM
Backing up importing & exporting ?? I am a newb Jazz OneNote 0 01-27-2016 10:18 PM
Newb needing VBA solution to change formatting newb - need help automating catalogue production Deeper Office 2 09-09-2015 01:45 AM
Newb needing VBA solution to change formatting Is there a solution to change the recentfilelist programmatically dherr Excel Programming 13 12-02-2014 08:31 AM
NEWB to Macros - formatting exports EC37 Excel Programming 52 06-25-2014 06:26 AM

Other Forums: Access Forums

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


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