News:

Happy New Year!

Main Menu

Invalid Document Identifier Error

Started by doudou, September 24, 2014, 03:24:15 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

doudou

Hello,

I have been scratching my head over this for a while I have the following simple VBA code ran from Excel. I have set up all the proper Visio references, the code chokes at the Page.Drop method with an invalid document identifier. Am i missing something. Thanks in advance.

Sub Test()
    Dim VisioApp As Visio.Application
    Set VisioApp = CreateObject("Visio.Application")
    Dim VisioDoc As Visio.Document
    Set VisioDoc = VisioApp.Documents.AddEx("")
    Dim VisioPage As Visio.Page
    Set VisioPage = VisioDoc.Pages(1)
    VisioPage.Drop VisioApp.Documents.Item("BASFLO_U.VSS").Masters.ItemU("Process"), 4.125, 8.125
End Sub

Paul Herber

Your code hasn't opened the stencil. It just assumes that the stencil is open.
Electronic and Electrical engineering, business and software stencils for Visio -

https://www.paulherber.co.uk/

doudou

Quote from: Paul Herber on September 24, 2014, 03:41:29 PM
Your code hasn't opened the stencil. It just assumes that the stencil is open.

:-[ Thanks!

Browser ID: smf (possibly_robot)
Templates: 4: index (default), Display (default), GenericControls (default), GenericControls (default).
Sub templates: 6: init, html_above, body_above, main, body_below, html_below.
Language files: 4: index+Modifications.english (default), Post.english (default), Editor.english (default), Drafts.english (default).
Style sheets: 4: index.css, attachments.css, jquery.sceditor.css, responsive.css.
Hooks called: 177 (show)
Files included: 34 - 1306KB. (show)
Memory used: 1055KB.
Tokens: post-login.
Cache hits: 13: 0.00112s for 26,589 bytes (show)
Cache misses: 3: (show)
Queries used: 17.

[Show Queries]