City, +day

P

Paolo B

I would like to have a macro were it write "Paris, " and the day of today

for example
Paris, "d MMMM yyyy"

but I dont know how to add "Paris, " with this macro

Sub Macro1()
Selection.InsertDateTime DateTimeFormat:="d MMMM yyyy"
End Sub

Thanks
PaoloB
 
P

Paolo B

Off the top of my head, so there may be compile errors; what about:
Selection.TypeText "Paris, " & Format$(Date(), "d mmmm yyyy")

Hi Malc,

thanks it works really good!!! but I dont understand (my english is not so
good!!) when you say "there may be compile errors" are you talking about my
micro or are you not sure that your micro could give me some errors?

PaoloB
 
M

Malcolm Smith

Hi Malc,

thanks it works really good!!! but I dont understand (my english is
not so
good!!) when you say "there may be compile errors" are you talking
about my
micro or are you not sure that your micro could give me some errors?

PaoloB


The latter. The thing is that for most of the code fragments I write on
the newsgroups I do from the top of my head without use of a Word
environment (my safety net). So, sometimes I may put down the wrong
method or mistype a property or something silly.

But, that's not the point. I don't think it's up to me to do people's
work for them all the time, so if errors do creep in then them trying to
fix it is better for them in the long run. If the lazy sods don't just
come back here and wail "It don't work!".

Quite often I am doing something else (today it's ASP stuff for web sites)
and then I pop back to the newsgroups to see if anyone is stuck and then I
just type a few lines of code in the hope that it gets them on the right
track.

So, what I'm saying is that if it works then it's a miracle!

Say Hello to the City of Light for me!
Malc
www.dragondrop.com
 

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