![]() |
|
#1
|
||||
|
||||
|
View>Show>Page Border
Is there any way throught VBA to toggle this function? i.e.... Code:
If Activedocument.Page.Border.Show = False then
Activedocument.Page.Border.Show = True
End If
__________________
Sean Waiting for a ride in the T.A.R.D.I.S. |
|
#2
|
|||
|
|||
|
Here is a workaround:
Code:
Sub ToggleBorders()
If ActiveDocument.Properties("PageBorder", 1) Then
ActiveDocument.Properties("PageBorder", 1) = False
Else
ActiveDocument.Properties("PageBorder", 1) = True
End If
SendKeys "%(vhp)"
End Sub
---edit-- In this variant I got rid of SendKeys Code:
Sub ToggleBorders()
If ActiveDocument.Properties("PageBorder", 1) Then
ActiveDocument.Properties("PageBorder", 1) = False
Else
ActiveDocument.Properties("PageBorder", 1) = True
End If
Application.FrameWork.Automation.Invoke "77f7f9eb-3e06-4899-9a8b-80d9e2aa68d3"
End Sub
Last edited by Lev; 23-08-2006 at 06:25. |
![]() |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | Search this Thread |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Shape.CreateContour problem | jemmyell | CorelDRAW/Corel DESIGNER VBA | 4 | 08-12-2005 15:52 |
| diffusion effect on the pic's border | leopardo | General | 1 | 08-08-2005 08:49 |
| Light color border around image when exporting to bitmaps | Alex | FAQ | 0 | 27-04-2005 12:33 |
| Corel is putting a border when I export in GIF format | Nicky | CorelDRAW/Corel DESIGNER VBA | 2 | 02-02-2004 23:26 |
| New macro to clip curves w.r.t. a border | Gerard Hermans | Macros/Add-ons | 0 | 09-06-2003 07:50 |