MapPoint Forums

MapForums

Community of MapPoint and Virtual Earth Users and Developers




How to save map as *.ptm programmatically in MapPoint?

This is a discussion on How to save map as *.ptm programmatically in MapPoint? within the MapPoint 2006/2009 Discussion forums, part of the Map Forums category; Hi, Anyone knows how to save the current map in an embedded MapPoint as TOleContainer as a ptm file? I ...


Go Back   MapPoint Forums > Map Forums > MapPoint 2006/2009 Discussion

Today's Posts Twitter Feed Register Blogs FAQ Members List Calendar Search Today's Posts Mark Forums Read



Click here to register

Reply

 

LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 10-07-2004
Senior Member
Black Belt
 
Join Date: Jul 2002
Posts: 5,138
How to save map as *.ptm programmatically in MapPoint?

Hi,

Anyone knows how to save the current map in an embedded MapPoint as TOleContainer as a ptm file?

I tried the following without success:

//
fMapPointApp.ActiveMap.Saved := False;
fMapPointApp.ActiveMap.SaveAs('Saved_Map_F.ptm', geoFormatMap, False);
//


Are these any properties I need to set to make it work? Or am I doing it all wrong?

Thanks,

/jean-phi
enosant<ignore_this_part>@hotmail.com
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #2 (permalink)  
Old 10-07-2004
John Meyer's Avatar
Senior Member
Blue Belt
 
Join Date: Jul 2002
Posts: 479
Not sure if this is the fix but try it. Let us know if it works or not.

//
fMapPointApp.ActiveMap.SaveAs('Saved_Map_F.ptm', 0, False);
//
__________________
John
http://www.support-pc.com

Order MapPoint 2006 Here
https://secure.mp2kmag.com/?refer=support-PC
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #3 (permalink)  
Old 10-07-2004
Senior Member
Black Belt
 
Join Date: Jul 2002
Posts: 5,138
How to save map as *.ptm programmatically in MapPoint?

This is the same as what I was doing I'm afraid, since in the type library geoFormatMap hs this definition:

//
Const
geoFormatMap = 0;

I really want to save as a map (that can be reopened and edited) and not HTML or JPEG which is what all other posts seem to be referring to.

Thanks,

/jean-phi
enosant<ignore_this_part>@hotmail.com
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #4 (permalink)  
Old 10-07-2004
Eric Frost's Avatar
Senior Member
Black Belt
 
Join Date: Jul 1992
Posts: 3,041
Blog Entries: 2
Hi Jean-phi,

I don't have any experience automating MapPoint from a TOleContainer. Is this the MapPoint control?

Check the help file, it looks like SaveAs is "Not available for embedded maps or the MapPoint Control."


It looks like there's two difference methods for saving from the control -

SaveMap Method
"Saves the specified map or template. If the map was opened from a template, then the map is saved as "Map.ptm" in the "My Documents" directory."
Private Sub cmdSave_Click()
MappointControl1.SaveMap
End Sub

SaveMapAs method
"Saves the specified map or template."
Private Sub cmdSaveAs_Click()
MappointControl1.SaveMapAs App.Path & "\NewMap.ptm"
End Sub

Eric
__________________
~ Now taking orders for MapPoint 2009 ~
~~
~ Upgrade to MapForums Plus membership ~
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Reply

Tags
map, mappoint, programmatically, ptm, save


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

 
Thread Tools
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
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads

Thread Thread Starter Forum Replies Last Post
programmatically create a field for a MapPoint.Dataset? citrix_99301 MapPoint 2006/2009 Discussion 1 03-18-2006 03:27 AM
Can I save Mappoint files as .est so they can be read by ST selfstorage MapPoint 2006/2009 Discussion 1 07-14-2005 01:09 PM
Drawing scribble on mappoint programmatically vidyakulkarni MapPoint 2006/2009 Discussion 1 07-29-2004 08:06 PM
How to programmatically connect to MapPoint Extranet Owen MapPoint 2006/2009 Discussion 0 05-09-2003 04:23 PM
Is it possible to save a MapPoint file in a form r.... Anonymous MapPoint 2006/2009 Discussion 1 03-09-2002 10:48 PM


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


Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.3.0 RC2
MP2K Magazine
Visitor Map

Tenerife Holiday
Find a great deal on a Tenerife holiday through UlookUbook! Check out the options online...



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59