All;
I have a weird problem when showing and hiding a bookmark in Word 2010. So here is what is going on. My code for showing and hiding AppendixD is working correctly when the document is being used. Once the document is saved, closed, and then re-opened, a table within the AppendixD bookmark is still being shown. The contents of the table are correctly hidden. It is just the outline of a table. I added AppendixD_Sub just around the table and contents to check to see what might be going on, but the table outline is still showing once you saved, closed, and then re-opened the document.
I have also tried to:
1) remove the Bookmark
2) remove the table
3) recreate the table
4) recreate the bookmark
The problem still occurs after those steps.
Any ideas on how to fix this?
Thanks,
Mike
I have a weird problem when showing and hiding a bookmark in Word 2010. So here is what is going on. My code for showing and hiding AppendixD is working correctly when the document is being used. Once the document is saved, closed, and then re-opened, a table within the AppendixD bookmark is still being shown. The contents of the table are correctly hidden. It is just the outline of a table. I added AppendixD_Sub just around the table and contents to check to see what might be going on, but the table outline is still showing once you saved, closed, and then re-opened the document.
I have also tried to:
1) remove the Bookmark
2) remove the table
3) recreate the table
4) recreate the bookmark
The problem still occurs after those steps.
Any ideas on how to fix this?
Code:
Private Sub FCA_Overseas_Click()
Application.ScreenUpdating = False
If FCA_Overseas.Value = True Then
ActiveDocument.Bookmarks("AppendixD").Range.Font.Hidden = False
ActiveDocument.Bookmarks("AppendixD_Sub").Range.Font.Hidden = False
ActiveDocument.Bookmarks("DAP").Range.Font.Hidden = True
ActiveDocument.Bookmarks("FCA").Range.Font.Hidden = False
ActiveDocument.Bookmarks("SAW").Range.Font.Hidden = True
Trad_Order.Value = True
SAW_Flow.Value = False
SAF_Flow.Value = False
Trans_Supplier.Value = False
FCA_Incoterm.Value = True
MilkRun.Value = False
Else
ActiveDocument.Bookmarks("AppendixD").Range.Font.Hidden = True
ActiveDocument.Bookmarks("AppendixD_Sub").Range.Font.Hidden = True
ActiveDocument.Bookmarks("DAP").Range.Font.Hidden = False
ActiveDocument.Bookmarks("FCA").Range.Font.Hidden = False
ActiveDocument.Bookmarks("SAW").Range.Font.Hidden = False
Trad_Order.Value = False
SAW_Flow.Value = False
SAF_Flow.Value = False
Trans_Supplier.Value = False
FCA_Incoterm.Value = False
MilkRun.Value = False
End If
Call TofC_Update
Application.ScreenUpdating = True
End Sub
Thanks,
Mike