macro help

D

David

I created a macro in bold type, the strange thing is that it only comes
out bold every other time! How do I resolve this..Thank you
 
T

Tony Jollans

If you want to give us a fighting chance of helping you resolve it, you
show us the code.

My *guess* is that you have a line like this ..

Selection.Font.Bold = Not Selection.Font.Bold

when you really want one like this ...

Selection.Font.Bold = True
 
D

David

It did work but is there a way to make this a default setting so I do
not have to repeat this step every day? Thanks for the help!
 
T

Tony Jollans

We really need a bit more information. What exactly are you doing every day?

Can you post your code, and a bit more detail - I'm sure it can be sorted.
 
D

David

On my laptop (don't have it home), in Microsoft Word, I create a Macro,
in bold for the date as I need to dictate patient progress notes and
using the macro makes it easier. So each day I record a new Macro, in
bold, for the date. The problem is, unless I change (under macro edit)
Selection Font.Bold=True (and I need to do that manually), every other
time I press the macro keys it comes out plain type and not bold! I
hope this makes sense!
 
C

Cindy M -WordMVP-

<[email protected]>
<[email protected]>

<#[email protected]>
<[email protected]>
Newsgroups: microsoft.public.word.vba.general
NNTP-Posting-Host: 227.38.63.81.cust.bluewin.ch 81.63.38.227
Path: number1.nntp.dca.giganews.com!border2.nntp.dca.giganews.com!nntp.giganews.com!news.glorb.com!newsfeed.cw.net!cw.net!news-FFM2.ecrc.de!newsfeed01.sul.t-online.de!newsfeed00.sul.t-online.de!t-online.de!TK2MSFTNGP08.phx.gbl!TK2MSFTNGP15.phx.gbl
Lines: 1
Xref: number1.nntp.dca.giganews.com microsoft.public.word.vba.general:81386

Hi David,
On my laptop (don't have it home), in Microsoft Word, I create a Macro,
in bold for the date as I need to dictate patient progress notes and
using the macro makes it easier. So each day I record a new Macro, in
bold, for the date. The problem is, unless I change (under macro edit)
Selection Font.Bold=True (and I need to do that manually), every other
time I press the macro keys it comes out plain type and not bold! I
hope this makes sense!
So, you're requirement is a macro that inserts the current day's date and
formats it bold? Does this work for you?

Sub InsertTheDate()
Dim rng as Word.Range

Set rng = Selection.Range
rng.Text = Format(Date, "mmmm d, yyyy")
rng.Bold = True
End Sub

Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update Jun 8 2004)
http://www.word.mvps.org

This reply is posted in the Newsgroup; please post any follow question or
reply in the newsgroup and not by e-mail :)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top