OberonPlace.com Forums  

Go Back   OberonPlace.com Forums > Corel User Forums > Corel DESIGNER > Macros/Add-ons

Reply
 
Thread Tools Search this Thread Display Modes
  #11  
Old 28-04-2010, 15:37
runflacruiser's Avatar
runflacruiser runflacruiser is offline
Senior Member
 
Join Date: Jun 2009
Location: Pigeon Forge, TN USA
Posts: 811
Default

And if you have less than x4 you'll need this little mod:

Code:
Sub ConvertParagraphText()
    Dim s As Shape, p As Page
    Dim srParagraph As ShapeRange
    
    For Each p In ActiveDocument.Pages
        Set srParagraph = p.Shapes.FindShapes(, cdrTextShape)
        For Each s In srParagraph
            On Error Resume Next
            s.Text.ConvertToArtistic
            On Error GoTo 0
        Next s
    Next p
End Sub
-John
Reply With Quote
  #12  
Old 28-04-2010, 15:45
shelbym's Avatar
shelbym shelbym is offline
Senior Member
 
Join Date: Nov 2002
Location: Cheyenne, WY
Posts: 1,769
Blog Entries: 9
Send a message via ICQ to shelbym Send a message via AIM to shelbym Send a message via MSN to shelbym Send a message via Yahoo to shelbym
Default A little Change

I would modify that just a bit. ;-)
Code:
Sub ConvertParagraphText()
    Dim s As Shape, p As Page
    Dim srParagraph As ShapeRange
    
    For Each p In ActiveDocument.Pages
        Set srParagraph = p.Shapes.FindShapes(, cdrTextShape)
        For Each s In srParagraph
            If s.Text.Type = cdrParagraphText Then s.Text.ConvertToArtistic
        Next s
    Next p
End Sub
-Shelby
Reply With Quote
  #13  
Old 28-04-2010, 15:48
runflacruiser's Avatar
runflacruiser runflacruiser is offline
Senior Member
 
Join Date: Jun 2009
Location: Pigeon Forge, TN USA
Posts: 811
Default

Just curious.
Is it ok to use errors like I did?

I am using it for powerclips on one of my macros.

-John
Reply With Quote
  #14  
Old 28-04-2010, 15:49
runflacruiser's Avatar
runflacruiser runflacruiser is offline
Senior Member
 
Join Date: Jun 2009
Location: Pigeon Forge, TN USA
Posts: 811
Default

ps. I was wondering what you would think of that...lol
Reply With Quote
  #15  
Old 28-04-2010, 15:50
shelbym's Avatar
shelbym shelbym is offline
Senior Member
 
Join Date: Nov 2002
Location: Cheyenne, WY
Posts: 1,769
Blog Entries: 9
Send a message via ICQ to shelbym Send a message via AIM to shelbym Send a message via MSN to shelbym Send a message via Yahoo to shelbym
Default Errors

I prefer not to use On Error Resume..., because I want to know what the code is doing or in this case not doing. Especially if the code is being brought into a larger project.

-Shelby
Reply With Quote
  #16  
Old 28-04-2010, 16:31
gorgo2 gorgo2 is offline
Senior Member
 
Join Date: Feb 2010
Posts: 107
Default

Quote:
Originally Posted by gorgo2 View Post
Good job!

Last one..
#4. save document as "new location in mydocuments folder".

I sort of know this one...but just need a little help.
I need to save the document using the 'save as' function to a specific location like MyDocuments...so this creates a copy of the document file onto my computer while leaving the one on the server alone.
um...not sure of anyone missed this
Reply With Quote
  #17  
Old 28-04-2010, 17:06
shelbym's Avatar
shelbym shelbym is offline
Senior Member
 
Join Date: Nov 2002
Location: Cheyenne, WY
Posts: 1,769
Blog Entries: 9
Send a message via ICQ to shelbym Send a message via AIM to shelbym Send a message via MSN to shelbym Send a message via Yahoo to shelbym
Default SaveAs

In its simplest form:
Code:
ActiveDocument.SaveAs "C:\MyFolder\MyFileName.cdr"
If you want to choose thumbnail size and versions you need to add StructSaveAsOptions like this:
Code:
Sub SaveMe() 
 Dim opt As New StructSaveAsOptions 
 
 opt.EmbedICCProfile = False 
 opt.EmbedVBAProject = True 
 opt.Filter = cdrCDR 
 opt.IncludeCMXData = False 
 opt.Overwrite = True 
 opt.Range = cdrAllPages 
 opt.ThumbnailSize = cdr10KColorThumbnail 
 opt.Version = cdrCurrentVersion 

 ActiveDocument.SaveAs "C:\MyFolder\MyFileName.cdr", opt 
End Sub
Best of luck,

-Shelby
Reply With Quote
  #18  
Old 28-04-2010, 18:55
gorgo2 gorgo2 is offline
Senior Member
 
Join Date: Feb 2010
Posts: 107
Default

Interesting...but how would I tell this macro to insert the correct file name?...the currently open document name?
I probably don't want to edit the macro each time just to 'save as'....

-Greg
Reply With Quote
  #19  
Old 28-04-2010, 19:04
runflacruiser's Avatar
runflacruiser runflacruiser is offline
Senior Member
 
Join Date: Jun 2009
Location: Pigeon Forge, TN USA
Posts: 811
Default

Hi.
This one may do what you need. It's free and open source code. It already has a form and you can modify as needed.

-John
Reply With Quote
  #20  
Old 28-04-2010, 19:22
gorgo2 gorgo2 is offline
Senior Member
 
Join Date: Feb 2010
Posts: 107
Default

Quote:
Originally Posted by runflacruiser View Post
Hi.
This one may do what you need. It's free and open source code. It already has a form and you can modify as needed.

-John
Okay, tried the link...I'm being asked for a login and password to download....

**UPDATE: Tried link in IE and got the file and will work with this. Thanks a lot John!

Last edited by gorgo2; 28-04-2010 at 19:30.
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
Opening document with disabling macros clausm CorelDRAW/Corel DESIGNER VBA 2 09-04-2010 15:06
New X4 Custom Dockers bprice CorelDRAW/Corel DESIGNER VBA 4 21-07-2008 11:11
Custom Palettes? masterchiefph CorelDRAW/Corel DESIGNER VBA 2 23-07-2007 19:41
Custom Palettes via VBA ddonnahoe CorelDRAW/Corel DESIGNER VBA 7 13-11-2006 07:53
Add Custom Buttons.. drg CorelDRAW/Corel DESIGNER VBA 6 17-09-2004 06:36


All times are GMT -5. The time now is 11:42.


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