CreganTur
07-15-2008, 08:54 AM
I've been automating some form letters for work, and everything's been going great with it... until I got to the letter they gave me today.
Example:
pages 1 & 2 are the primary customer's letter, and pages 3 & 4 are the secondary customer's letter. If I have a primary and secondary customer, then the document is unchanged, except for the data inserted via a UserForm. If there is only a single customer, however, then I hide pages 3 & 4 using:
If optMkrOnly = True Then '<<<Option button on UserForm
ActiveDocument.Bookmarks("CmkrLetter").Select
Selection.Font.Hidden = True
End If
The bookmark "CmkrLetter" is a bookmark that is comprised of pages 3 & 4. This code works perfectly for any text in the pages.
Here's my problem: this new letter has frames on it. I've never really worked with frames, so they're still pretty new to me.
What I need to know: is there a way to hide the frames that are in the range of the bookmark "CmkrLetter"?
Please let me know if this doesn't make sense.
Example:
pages 1 & 2 are the primary customer's letter, and pages 3 & 4 are the secondary customer's letter. If I have a primary and secondary customer, then the document is unchanged, except for the data inserted via a UserForm. If there is only a single customer, however, then I hide pages 3 & 4 using:
If optMkrOnly = True Then '<<<Option button on UserForm
ActiveDocument.Bookmarks("CmkrLetter").Select
Selection.Font.Hidden = True
End If
The bookmark "CmkrLetter" is a bookmark that is comprised of pages 3 & 4. This code works perfectly for any text in the pages.
Here's my problem: this new letter has frames on it. I've never really worked with frames, so they're still pretty new to me.
What I need to know: is there a way to hide the frames that are in the range of the bookmark "CmkrLetter"?
Please let me know if this doesn't make sense.