Welcome to MapForums!

Register, sign in, or use Facebook Connect above to join in and participate in the forum.

When you are signed in, this message, the ads in this row, and the red-underlined link ads all go away.

Subscribe to receive our newsletter.
Subscribe Unsubscribe
Results 1 to 5 of 5

writing directions to a word file

This is a discussion on writing directions to a word file within the MapPoint Desktop Discussion forums, part of the Map Forums category; I read in a mappoint programming book that you can write code that loops through all locations within a given ...

  1. #1
    garon5 is offline Junior Member Yellow Belt
    Join Date
    Oct 2006
    Posts
    28

    writing directions to a word file

    I read in a mappoint programming book that you can write code that loops through all locations within a given radius, processing them however you want one at a time. Sample code was given.

    Is it possible to write code that calculates directions to each point within the circle (assuming you have a center inputted) and write the set to a word file? If so, how would the small icons (e.g. distance for that section) at the end of each line of directions be outputted? What is the best text for reading about such code?

    Gary

  2. #2
    Wilfried is offline Senior Member Black Belt
    Join Date
    Nov 2004
    Location
    Belgium
    Posts
    2,433

    Re: writing directions to a word file

    Hi,

    I'm not sure what you mean by 'each point in the circle', but the answer is yes, you can write code to calculate a route. And you have access in your code to the directions, so it is easy to save them in a file.

  3. #3
    Eric Frost's Avatar
    Eric Frost is offline Administrator Black Belt
    Join Date
    Jul 1992
    Posts
    5,094
    Blog Entries
    4

    Re: writing directions to a word file

    You can copy All the directions and paste into Word, I wrote this recently for a client --

    Code:
     
      objMap.CopyDirections
      
      'instantiate Word and paste into Word.
      Dim wrdApp As Word.Application
      Dim wrdDoc As Word.Document
      Set wrdApp = CreateObject("Word.Application")
      'wrdApp.Visible = True
      Set wrdDoc = wrdApp.Documents.Add ' create a new document
      wrdDoc.Content.PasteSpecial DataType:=wdPasteText
      
      Set myRange = wrdApp.Selection
      myRange.WholeStory
      myRange.Font.Size = 16
    Note that this pastes it as unformatted and then changes the Font. You may want to paste it in as formatted.

    Also, this pastes in All of the directions, you can also see in the Help File how you can access each individual bits of the directions in detail and write it out however you want.

    Regarding looping around to all the points, yes you can do that; each will be a different Route.

  4. #4
    garon5 is offline Junior Member Yellow Belt
    Join Date
    Oct 2006
    Posts
    28

    Re: writing directions to a word file

    Eric - Thanks - I will be getting around to that code later this year. I will have to do some reading to get to the point of actually tweaking it, compiling and testing, but eventually it should work.

    Gary

  5. #5
    Eric Frost's Avatar
    Eric Frost is offline Administrator Black Belt
    Join Date
    Jul 1992
    Posts
    5,094
    Blog Entries
    4

    Re: writing directions to a word file

    Good luck, please feel free to post again if you encounter difficulties.

    Eric

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Writing files in a VB Addin?
    By Winwaed in forum MapPoint Desktop Discussion
    Replies: 7
    Last Post: 01-25-2007, 09:06 AM
  2. Writing a new COM component for MapPoint2002
    By tanguy_laverdure in forum MapPoint Desktop Discussion
    Replies: 0
    Last Post: 12-04-2003, 03:03 AM
  3. High quality export for a Word file
    By Anonymous in forum MapPoint Desktop Discussion
    Replies: 1
    Last Post: 08-28-2003, 03:05 PM
  4. "Microsoft Mappoint" writing and Pushpin Highligth
    By feanor in forum MapPoint Desktop Discussion
    Replies: 0
    Last Post: 03-12-2003, 05:47 AM
  5. 10 Second Tutorial: Embedding With Word
    By Anonymous in forum MP2K Magazine Articles
    Replies: 0
    Last Post: 07-01-2001, 12:48 AM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


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