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 30-06-2007, 14:27
diwin
Guest
 
Posts: n/a
Default File location

In a small app I have written, I open a .cdt file of a map, add dots to the map, but do not change the template. Since the app uses the same template all the time, can I reference the path of the file location in VBA in a way that is analogous to Application.CurrentProject.Path in MS Access?
Reply With Quote
  #2  
Old 30-06-2007, 15:44
wOxxOm's Avatar
wOxxOm wOxxOm is offline
Senior Member
 
Join Date: Mar 2005
Posts: 836
Default

it depends on where your cdt file is located.

or do you mean that your cdtfile contains macro project? in this case once new cdr file is created based on cdt template it has new (temporary) file path.
Reply With Quote
  #3  
Old 01-07-2007, 10:13
diwin
Guest
 
Posts: n/a
Default

Thanks wOxxOm.

I don't know how a cdt file can contain a macro project. Below is my project explor window
One reason I want the path of the cdt project (gotten dynamically) is to use that path for finding related files, creating backups and output files.
Attached Images
 
Reply With Quote
  #4  
Old 01-07-2007, 10:24
wOxxOm's Avatar
wOxxOm wOxxOm is offline
Senior Member
 
Join Date: Mar 2005
Posts: 836
Default

:-) I still can't figure out where CDT file is located, how do you open it, etc.
Reply With Quote
  #5  
Old 01-07-2007, 13:34
diwin
Guest
 
Posts: n/a
Default

It's just in a particular folder. Something like: "C:\My Documents\WeedMaps\MapFiles\".

It is opened using code in the OpenMap module, using Set newDoc = CreateDocumentFromTemplate("C:\My Documents\WeedMaps\MapFiles\Weedmaps.cdt"). This procedure is run from a toolbar icon.

Last edited by diwin; 01-07-2007 at 13:37.
Reply With Quote
  #6  
Old 01-07-2007, 13:46
wOxxOm's Avatar
wOxxOm wOxxOm is offline
Senior Member
 
Join Date: Mar 2005
Posts: 836
Default

:-) I still don't get what you want know...so two guesses:
1. To fetch current document path: ActiveDocument.FilePath
2. Declare some global constant:
Code:
public const sCDTfile as string = "C:\My Documents\WeedMaps\MapFiles\Weedmaps.cdt"
then use the constant name.
3. I'm totally misled by you, - only small pieces of whole picture which is yet unknown
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
Saving File while auto generating Jpg files vindaa Macros/Add-ons 16 03-01-2007 20:44
file name inserter - font and sharing question mick classen CorelDRAW/Corel DESIGNER VBA 2 31-10-2006 18:15
auto naming exported file to specific path vindaa Macros/Add-ons 0 18-08-2006 17:50
delete vba project from cdr file hotairballoon CorelDRAW/Corel DESIGNER VBA 1 18-05-2005 10:08
Open - Resize - Savefile in Photo Paint greenee Corel Photo-Paint VBA 2 28-06-2003 04:54


All times are GMT -5. The time now is 22:26.


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