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 25-03-2015, 11:58
PAnderson PAnderson is offline
Member
 
Join Date: Nov 2003
Posts: 47
Default Create a New Doc from Template in Connect

I am looking for a way to create a new document from a template when I select a template file (.cdt) within the Connect docker. As it is now the only way is to open the template file itself...and then hope you remember to do a "Save As" so you won't overwrite your template file!

There is a method, CreateDocumentFromTemplate, but I'm not sure this would work since it requires a path for the file.

Perhaps, this should be a feature request?? because ideally, there should be an option in the right-click context menu or a button on the Connect docker itself.

Patti
Reply With Quote
  #2  
Old 29-03-2015, 13:39
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 Templates

Patti,

Template data is normally stored in a few spots. Online, which you will need to download first if you wish to open via VBA. There is currently no way to download Content from the Content Exchange via VBA.

When you download Content Exchange content it is normally stored here:

C:\Users\Public\Documents\Corel\Content X6\Templates\

The standard templates are store here:

C:\Users\**[YourUserName]**\Documents\Corel\Corel Content\Templates\

Once you know where the template is that you wish to open, you can use VBA to create the document:
Code:
Sub Test()
    Dim d As Document

    Set d = CreateDocumentFromTemplate("C:\Users\Public\Documents\Corel\Content X6\Templates\Craft Store - NA\Craft Store NA - Business Card 1 - ISO.cdt", True)
End Sub
This will create an Untitled document with the content from the template. Hopefully that helps, let me know if you have questions.

-Shelby
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
Set the VBProject of ActiveDocument if Template FaneDuru CorelDRAW/Corel DESIGNER VBA 1 09-01-2013 14:46
Corel Connect to Browse online Images mydownloadforum New product ideas 2 22-04-2011 09:00
Template files rbentley General 1 20-08-2008 14:45
In need of macro to import multiple GIF's onto template opinionsrfun CorelDRAW/Corel DESIGNER VBA 31 12-10-2007 14:22
Variable photos in template RonHill General 7 01-08-2005 13:17


All times are GMT -5. The time now is 07:04.


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