Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

How to add page color to word document using SAP OLE

purush_r
Explorer
0 Kudos

HI,

I want my MS word page color to be grey when called from SAP, tried various option but it is not working. Please provide me your suggestions.

4 REPLIES 4

Former Member
0 Kudos

Which shade of gray do you feel like using. I hear there are fifty shades

0 Kudos

Hi Manish -

Any shade of gray is ok for me. What is the syntax to use? Thanks for your response.

0 Kudos

You might have seen some sample codes of OLE. The way they get the object, and then get/set attribute.

The VB macro code for setting background to 25% darker gray would be:


ActiveDocument.Background.Fill.ForeColor.ObjectThemeColor = wdThemeColorBackground1

ActiveDocument.Background.Fill.ForeColor.TintAndShade = -0.25

ActiveDocument.Background.Fill.Visible = msoTrue

ActiveDocument.Background.Fill.Solid

You have to execute these commands using OLE.

raymond_giuseppi
Active Contributor
0 Kudos

Try to translate in OLE2 a recorded macro code like (here a light grey...)


ActiveDocument.Background.Fill.ForeColor.ObjectThemeColor = wdThemeColorBackground1
ActiveDocument.Background.Fill.ForeColor.TintAndShade = -0.15
ActiveDocument.Background.Fill.Visible = msoTrue
ActiveDocument.Background.Fill.Solid

Regards,

Raymond