![]() |
|
|
|
#1
|
||||
|
||||
|
Try:
Code:
Sub UnlinkItalic()
'Unlink Database Macro
Dim bItal As Boolean, Rng As Range
Const Pwd As String = ""
With ActiveDocument
If .ProtectionType <> wdNoProtection Then
.Unprotect Password:=Pwd
End If
While .FormFields.Count > 0
Set Rng = .Bookmarks(.FormFields(1).Name).Range
With Rng
bItal = .Fields(1).Code.Font.Italic
.End = .End + 1
.Fields(1).Unlink
.End = .End - 1
.Font.Italic = bItal
End With
Wend
End With
End Sub
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
|
#2
|
|||
|
|||
|
Thanks Paul, works great. Again you have managed to make my brain explode. Questions:
1) what does "bltal" stand for? 2) would there have been a better way to write the bookmark code in the conditional content macro? 3) I've looked for a way to use range object to move cursor to right/left and only have seen "Selection.MoveRight Unit: wdCharacter, Count:=1"? 4) If Range object is better that Selection, why does Word record only "Selection"? Again thanks- |
|
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| paragraph drop down menu | noamsa | Word | 4 | 02-12-2015 01:36 PM |
| Need help with drop-down menu please | cazclocker | Excel | 7 | 01-05-2015 04:07 PM |
HELP -- Drop Menu for Reoccuring Data??
|
cscaudle | Word | 1 | 03-02-2014 10:19 AM |
| Drop down menu with different value to display name | swsquish | Word | 1 | 09-04-2012 08:45 PM |
| Merge fields & Drop down menu's | ShadeTree | Word | 0 | 03-09-2010 08:19 AM |