Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 04-03-2021, 05:49 AM
komobu komobu is offline Disable Bold Font by Keystroke? Windows XP Disable Bold Font by Keystroke? Office 2003
Advanced Beginner
Disable Bold Font by Keystroke?
 
Join Date: Feb 2011
Posts: 34
komobu is on a distinguished road
Default Disable Bold Font by Keystroke?

Hi;

I have numbers in outlook calendar items that I have to add an asterisk to the front and end of it for Barcode reading.

The barcode reader uses the asterisks to tell it where to start and stop reading. If they are not there, it wont read it. So if the number was 123, it will become *123*



When outlook sees the asterisks added, it automatically changes the font to bold. The Bold font changes the width of the vertical lines in the barcode and that screws up the interpretation of the line. So I really need to be able to add the asterisks without the font changing to Bold.

Is there a way to disable this setting in outlook?

Thanks for any help.
Reply With Quote
  #2  
Old 04-04-2021, 03:02 AM
gmayor's Avatar
gmayor gmayor is offline Disable Bold Font by Keystroke? Windows 10 Disable Bold Font by Keystroke? Office 2019
Expert
 
Join Date: Aug 2014
Posts: 4,101
gmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud of
Default

I don't think that is possible, but I gave you a macro a few days ago that would insert a barcode. If you don't want a QR code then change the line

Code:
oRng.Fields.Add oPara, 99, Chr(34) & sNum & Chr(34) & Chr(32) & "QR" & " \t", False
to

Code:
oRng.Fields.Add oPara, 99, Chr(34) & sNum & Chr(34) & Chr(32) & "CODE39" & " \t", False
__________________
Graham Mayor - MS MVP (Word) (2002-2019)
Visit my web site for more programming tips and ready made processes www.gmayor.com
Reply With Quote
  #3  
Old 04-04-2021, 12:51 PM
komobu komobu is offline Disable Bold Font by Keystroke? Windows XP Disable Bold Font by Keystroke? Office 2003
Advanced Beginner
Disable Bold Font by Keystroke?
 
Join Date: Feb 2011
Posts: 34
komobu is on a distinguished road
Default

Thanks for your help.

Nothing happens when I run this macro.

I selected the developer tab

Then clicked Visual Basic (Alt f11)

Selected Insert and inserted a new module

Pasted the code in the new module

Renamed the module to AddBarCode

When I run it, nothing happens
Reply With Quote
  #4  
Old 04-04-2021, 08:39 PM
gmayor's Avatar
gmayor gmayor is offline Disable Bold Font by Keystroke? Windows 10 Disable Bold Font by Keystroke? Office 2019
Expert
 
Join Date: Aug 2014
Posts: 4,101
gmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud of
Default

Did you select the calendar item before running the code?
__________________
Graham Mayor - MS MVP (Word) (2002-2019)
Visit my web site for more programming tips and ready made processes www.gmayor.com
Reply With Quote
  #5  
Old 04-05-2021, 07:03 AM
komobu komobu is offline Disable Bold Font by Keystroke? Windows XP Disable Bold Font by Keystroke? Office 2003
Advanced Beginner
Disable Bold Font by Keystroke?
 
Join Date: Feb 2011
Posts: 34
komobu is on a distinguished road
Default

yes...the button to run the macro is on the calendar item quick access toolbar
Reply With Quote
  #6  
Old 04-05-2021, 09:33 PM
gmayor's Avatar
gmayor gmayor is offline Disable Bold Font by Keystroke? Windows 10 Disable Bold Font by Keystroke? Office 2019
Expert
 
Join Date: Aug 2014
Posts: 4,101
gmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud of
Default

In that case the appointment item content does not match your description of that content. The code was specific to what you said.
The best I can suggest without access to the item is to offer a macro that will bar code the selected text in the appointment body. Select the number you want coding and run the following.
Code:
Sub BarCodeSelected()
'Graham Mayor - https://www.gmayor.com - Last updated - 06 Apr 2021
Dim olItem As AppointmentItem
Dim olInsp As Outlook.Inspector
Dim wdDoc As Object
Dim oRng As Object
Dim oPara As Object
Dim i As Integer
Dim sNum As String
    Set olItem = Application.ActiveExplorer.Selection.Item(1)
    With olItem
        .Save
        Set olInsp = .GetInspector
        Set wdDoc = olInsp.WordEditor
        Set oRng = wdDoc.Windows(1).Selection.Range
        sNum = oRng.Text
        oRng.Fields.Add oRng, 99, Chr(34) & sNum & Chr(34) & Chr(32) & "CODE39" & " \t", False
    End With
lbl_Exit:
    Exit Sub
End Sub
__________________
Graham Mayor - MS MVP (Word) (2002-2019)
Visit my web site for more programming tips and ready made processes www.gmayor.com
Reply With Quote
Reply

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
Change to Bold font behaviour in Word 2016? jharrop Word 3 08-06-2018 05:31 PM
Disable Bold Font by Keystroke? Replace bold font with different bold font BigJ PowerPoint 1 07-30-2018 08:06 AM
Disable Asian font in comments or choose Latin font by default ryofurue Word 3 05-30-2018 08:33 PM
word 2007 bold not using font crodgers Word 1 10-12-2011 04:42 AM
David.ttf font coming up bold nazareneisrael Word 0 01-25-2010 11:07 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 11:21 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2024 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft