OberonPlace.com Forums  

Go Back   OberonPlace.com Forums > Developer Forums > VBA > CorelDRAW/Corel DESIGNER VBA

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 22-08-2006, 09:26
ddonnahoe's Avatar
ddonnahoe ddonnahoe is offline
Senior Member
 
Join Date: Jan 2004
Location: Louisville, KY
Posts: 552
Send a message via ICQ to ddonnahoe Send a message via AIM to ddonnahoe Send a message via MSN to ddonnahoe Send a message via Yahoo to ddonnahoe
Default View>Show>Page Border

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
I know this code is incorrect. That is why I pose the question.
__________________
Sean
Waiting for a ride in the T.A.R.D.I.S.
Reply With Quote
  #2  
Old 22-08-2006, 14:51
Lev
Guest
 
Posts: n/a
Default

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
You can also use an API function SendMessage instead of SendKeys, but I was too lazy to search for it's number
---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
I'll try to detect wheather PageBorder is enabled in document later and publish it on success

Last edited by Lev; 23-08-2006 at 07:25.
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Shape.CreateContour problem jemmyell CorelDRAW/Corel DESIGNER VBA 4 08-12-2005 16:52
diffusion effect on the pic's border leopardo General 1 08-08-2005 09:49
Light color border around image when exporting to bitmaps Alex FAQ 0 27-04-2005 13:33
Corel is putting a border when I export in GIF format Nicky CorelDRAW/Corel DESIGNER VBA 2 03-02-2004 00:26
New macro to clip curves w.r.t. a border Gerard Hermans Macros/Add-ons 0 09-06-2003 08:50


All times are GMT -5. The time now is 06:08.


Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2021, Jelsoft Enterprises Ltd.
Copyright © 2011, Oberonplace.com