How do I add the below???

I opened a new word doc, went to tools - visuall basic editor. Then
added the following to module1:

ThisDocument.Colors(1) = RGB(100, 200, 200)
ThisDocument.Colors(2) = RGB(100, 200, 200)
ThisDocument.Colors(55) = RGB(100, 200, 200)
ThisDocument.Colors(56) = RGB(100, 200, 200)

basically, what I am trying to do is change collors to custom collors
every time the document opens. To eliminate the document reverting to
standard colors or custom set on that machine.

Thanks,

Sam

Re: word colors by Tony

Tony
Mon Apr 24 13:27:36 CDT 2006

Word doesn't have a 56-colour palette like Excel does. There is no 'standard
set' or colour scheme associated with a document.

In Word 2000 and above you can use any combination of the full range of RGB
colours in any document. Your options are more limited in Word 97 - there
are fewer colours available and you can't control what they are.

--
Enjoy,
Tony

<samearle@gmail.com> wrote in message
news:1145902826.024531.300950@i40g2000cwc.googlegroups.com...
> How do I add the below???
>
> I opened a new word doc, went to tools - visuall basic editor. Then
> added the following to module1:
>
> ThisDocument.Colors(1) = RGB(100, 200, 200)
> ThisDocument.Colors(2) = RGB(100, 200, 200)
> ThisDocument.Colors(55) = RGB(100, 200, 200)
> ThisDocument.Colors(56) = RGB(100, 200, 200)
>
> basically, what I am trying to do is change collors to custom collors
> every time the document opens. To eliminate the document reverting to
> standard colors or custom set on that machine.
>
> Thanks,
>
> Sam
>



Re: word colors by samearle

samearle
Mon Apr 24 14:16:21 CDT 2006

How would I set them to be automatic? Ergo, when a document opens, the
colors are in the palette for use? Or, when opened, the defaut font is
a specific color and font?


Re: word colors by Dave

Dave
Mon Apr 24 14:27:31 CDT 2006

Hi,

You could intercept the New and Open events and insert something like the
following:

With Selection.Font
.Name = "Arial"
.Color = RGB(100, 200, 200)
End With

You could create a code template that's attached to your document or in the
startup directory that has a toolbar with commands for each of your colors.

HTH,
Dave

<samearle@gmail.com> wrote in message
news:1145906180.963484.319630@t31g2000cwb.googlegroups.com...
> How would I set them to be automatic? Ergo, when a document opens, the
> colors are in the palette for use? Or, when opened, the defaut font is
> a specific color and font?
>



Re: word colors by samearle

samearle
Mon Apr 24 14:39:42 CDT 2006

Wow - I'm sure that is great, and I'm sure it work - problem is I'm a
novice.

I guess you are saying, put in the VBA:

Private Sub Document_Open()
With Selection.Font
.Name = "Arial"
.Color = RGB(100, 200, 200)
End With
End Sub

Then save the document, or save it as a template?

Thanks,

S.


Re: word colors by Jean-Guy

Jean-Guy
Mon Apr 24 15:38:49 CDT 2006

samearle@gmail.com was telling us:
samearle@gmail.com nous racontait que :

> Wow - I'm sure that is great, and I'm sure it work - problem is I'm a
> novice.
>
> I guess you are saying, put in the VBA:
>
> Private Sub Document_Open()
> With Selection.Font
> .Name = "Arial"
> .Color = RGB(100, 200, 200)
> End With
> End Sub
>
> Then save the document, or save it as a template?

It depends. Do you need a template or a document?

Generally, when there is code, we use template. then you will need something
like:


'When a document based on this template is opened...
'but is this code still needed when already saved document are opened?
Private Sub Document_Open()
SetFontColour
End Sub

'When new documents are created based on this template
Private Sub Document_New()
SetFontColour
End Sub

Private SetFontColour()
With Selection.Font
.Name = "Arial"
.Color = RGB(100, 200, 200)
End With
End Sub



--
Salut!
_______________________________________
Jean-Guy Marcil - Word MVP
jmarcilREMOVE@CAPSsympatico.caTHISTOO
Word MVP site: http://www.word.mvps.org



Re: word colors by samearle

samearle
Mon Apr 24 16:18:50 CDT 2006

Jen-Guy,

Merci! Tres Bein!!! Wish I knew french.....

I think it has worked. I put the following in the VBA, then saved the
document at a template:

Private Sub Document_Open()
SetFontColour
End Sub

Private Sub Document_New()
SetFontColour
End Sub

Private SetFontColour()
With Selection.Font
.Name = "Arial Narrow"
.Color = RGB(60, 70, 100)
End With
End Sub

Thanks so much.

Sam


Re: word colors by samearle

samearle
Mon Apr 24 16:36:04 CDT 2006

Jen-Guy,

Merci! Tres Bein!!! Wish I knew french.....

I think it has worked. I put the following in the VBA, then saved the
document at a template:

Private Sub Document_Open()
SetFontColour
End Sub

Private Sub Document_New()
SetFontColour
End Sub

Private SetFontColour()
With Selection.Font
.Name = "Arial Narrow"
.Color = RGB(60, 70, 100)
End With
End Sub

Thanks so much.

Sam


Re: word colors by Jean-Guy

Jean-Guy
Mon Apr 24 16:38:51 CDT 2006

samearle@gmail.com was telling us:
samearle@gmail.com nous racontait que :

> Jen-Guy,
>
> Merci! Tres Bein!!! Wish I knew french.....
>
> I think it has worked. I put the following in the VBA, then saved the
> document at a template:
>
> Private Sub Document_Open()
> SetFontColour
> End Sub

Keep in mind that this part will only affect the selection when you open the
document, i.e, the first character.
This is why I asked if this was necessary.
If you want to change the whole document, different code is needed.


--
Salut!
_______________________________________
Jean-Guy Marcil - Word MVP
jmarcilREMOVE@CAPSsympatico.caTHISTOO
Word MVP site: http://www.word.mvps.org



Re: word colors by Tony

Tony
Mon Apr 24 16:39:20 CDT 2006

I'm glad that you're happy but I really don't understand what you've
achieved.

In the first place you were asking about a colour palette but now you just
want a single default colour in a template - that doesn't need code at all.

Open your template for editing. Select Fomat > Styles and Formatting (or
equivalent if you're not using 2003). Modify the Normal Style to have your
chosen colour. Get rid of the code. Save and Close.

--
Enjoy,
Tony

<samearle@gmail.com> wrote in message
news:1145913530.815816.312080@j33g2000cwa.googlegroups.com...
> Jen-Guy,
>
> Merci! Tres Bein!!! Wish I knew french.....
>
> I think it has worked. I put the following in the VBA, then saved the
> document at a template:
>
> Private Sub Document_Open()
> SetFontColour
> End Sub
>
> Private Sub Document_New()
> SetFontColour
> End Sub
>
> Private SetFontColour()
> With Selection.Font
> .Name = "Arial Narrow"
> .Color = RGB(60, 70, 100)
> End With
> End Sub
>
> Thanks so much.
>
> Sam
>