Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 11-23-2015, 11:18 PM
macropod's Avatar
macropod macropod is offline Help with drop down menu changing Italic font when unlinked Windows 7 64bit Help with drop down menu changing Italic font when unlinked 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

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]
Reply With Quote
  #2  
Old 11-24-2015, 05:21 AM
brent chadwick brent chadwick is offline Help with drop down menu changing Italic font when unlinked Windows 8 Help with drop down menu changing Italic font when unlinked Office 2013
Advanced Beginner
Help with drop down menu changing Italic font when unlinked
 
Join Date: Mar 2015
Posts: 86
brent chadwick is on a distinguished road
Default

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-
Reply With Quote
Reply

Thread Tools
Display Modes


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 with drop down menu changing Italic font when unlinked 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

Other Forums: Access Forums

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