Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8602353
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T02:03:56+00:00 2026-06-12T02:03:56+00:00

I’m trying to programmatically create a timeline and markers using the Visio 2010 COM

  • 0

I’m trying to programmatically create a timeline and markers using the Visio 2010 COM Interops. My code is based off of Chris Castillo’s 2 part blog posting (Part 1, Part 2), which is the only semi-complete example I’ve been able to find on how to do this. However his blog (from 2004) doesn’t seem to work right. The milestones are not really connected to the timeline, and updating their date does not get them to move to the right place.

Any suggestions or fixes?

enter image description here

Imports Microsoft.Office.Interop.Visio
Imports System.Diagnostics.CodeAnalysis
Imports System.Runtime.InteropServices

…

Dim VisioApp As New Application

Dim myDoc As Document = VisioApp.Documents.Add("")
Dim myPage As Page = myDoc.Pages.Item(1)

Dim TimelineStencils As Document =
    VisioApp.Documents.Add("Timeline Shapes.vss")

Dim theTimeline As Shape
Dim theMilestone As Shape

VisioApp.AlertResponse = 1

theTimeline = myPage.Drop(
    TimelineStencils.Masters.ItemU("Block timeline"), 5.610236, 5.511811)

theTimeline.CellsU("User.visBeginDate").FormulaU = _
        VisioApp.ConvertResult(
            "1/1/2004", VisUnitCodes.visDate, VisUnitCodes.visInches)

theTimeline.CellsU("User.visEndDate").FormulaU = _
    VisioApp.ConvertResult(
        "12/31/2004", VisUnitCodes.visDate, VisUnitCodes.visInches)

VisioApp.Addons("ts").Run("/cmd=3")

theMilestone = myPage.Drop( _
    TimelineStencils.Masters.ItemU("Line milestone"), _
    5.610236, 5.511811)

theMilestone.CellsU("User.visMilestoneDate").FormulaU = _
    VisioApp.ConvertResult(
        "7/1/2004", VisUnitCodes.visDate, VisUnitCodes.visInches)

VisioApp.AlertResponse = 0
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-12T02:03:57+00:00Added an answer on June 12, 2026 at 2:03 am

    So I found a much better walk-through of programmatically adding visio objects that @JohnGoldsmith linked to in some of his other answers to related questions, and found a better way of creating the stencils and page, and it’s working!

    Dim VisioApp As New Application
    
    Dim myDoc As Document = VisioApp.Documents.Add("Timeline.vst")
    Dim myPage As Page = myDoc.Pages.Item(1)
    
    Dim TimelineStencilName As String = "TIMELN_M.VSS"
    Dim TimelineStencilDoc As Document
    
    For Each Doc As Document In VisioApp.Documents
        If Doc.Name = TimelineStencilName Then
            TimelineStencilDoc = Doc
            Exit For
        End If
    Next
    
    Dim TimelineMaster As Master =
        TimelineStencilDoc.Masters.ItemU("Block timeline")
    
    Dim MilestoneMaster As Master =
        TimelineStencilDoc.Masters.ItemU("Line milestone")
    
    Dim theTimeline As Shape
    Dim theMilestone As Shape
    
    theTimeline = myPage.Drop(TimelineMaster, 5.610236, 5.511811)
    
    theTimeline.CellsU("User.visBeginDate").FormulaU = _
        VisioApp.ConvertResult(
                "1/1/2004", VisUnitCodes.visDate, VisUnitCodes.visInches)
    
    theTimeline.CellsU("User.visEndDate").FormulaU = _
        VisioApp.ConvertResult(
            "12/31/2004", VisUnitCodes.visDate, VisUnitCodes.visInches)
    
    theMilestone = myPage.Drop( _
        MilestoneMaster, _
        5.610236, 5.511811)
    
    theMilestone.CellsU("User.visMilestoneDate").FormulaU = _
        VisioApp.ConvertResult(
            "10/1/2004", VisUnitCodes.visDate, VisUnitCodes.visInches)
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Basically, what I'm trying to create is a page of div tags, each has
I'm trying to decode HTML entries from here NYTimes.com and I cannot figure out
I'm trying to create an if statement in PHP that prevents a single post
I am trying to understand how to use SyndicationItem to display feed which is
I'm new to using the Perl treebuilder module for HTML parsing and can't figure
link Im having trouble converting the html entites into html characters, (&# 8217;) i
That's pretty much it. I'm using Nokogiri to scrape a web page what has
Configuring TinyMCE to allow for tags, based on a customer requirement. My config is
I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function
I am reading a book about Javascript and jQuery and using one of the

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.