none
Open PDF as Object in Visio using c#

답변

  •             var visioapp = axDrawingControl1.Window.NewWindow();
                int DiagramServices = 0;
                DiagramServices = visioapp.Document.DiagramServicesEnabled;
                visioapp.Document.DiagramServicesEnabled = (int)  Microsoft.Office.Interop.Visio.VisDiagramServices.visServiceVersion140;           
                this.axDrawingControl1.Window.Page.InsertObject("{B801CA65-A1FC-11D0-85AD-444553540000}", Microsoft.Office.Interop.Visio.tagVisInsertObjArgs.visInsertAsEmbed);           
                visioapp.Document.DiagramServicesEnabled = DiagramServices;


    Abin

    • 답변으로 표시됨 AbinMatthew 2012년 3월 21일 수요일 오전 8:35
    2012년 3월 21일 수요일 오전 8:35

모든 응답

  • Visio cannot 'open' a pdf file. You should however be able to insert it as an object, like an image.

    al


    If this answer solves your problem, please check Mark as Answered. If this answer helps, please click the Vote as Helpful button. Al Edlund Visio MVP

    2012년 3월 20일 화요일 오전 10:04
  • Hi Edlund,

    I dont know whether the Visio opens pdf file as image, There is an option to insert Adobe acrobat Document. I think the same way we can open a window or option using C#. I need to know how to do that. If u can please help me out.

    Thanks for responding.


    Abin

    2012년 3월 20일 화요일 오전 10:17
  • The shortcut is to (in developer mode) start recording a macro. Perform the object embed and  when completed stop the macro to see what actions were happening under the covers. Assuming you've captured the correct events, I usually use one of the free utilities on the web to convert the captured vb code to c#. There isn't a lot of supporting information on object embed for oem products that I have seen.

    al


    If this answer solves your problem, please check Mark as Answered. If this answer helps, please click the Vote as Helpful button. Al Edlund Visio MVP

    2012년 3월 20일 화요일 오후 3:59
  •             var visioapp = axDrawingControl1.Window.NewWindow();
                int DiagramServices = 0;
                DiagramServices = visioapp.Document.DiagramServicesEnabled;
                visioapp.Document.DiagramServicesEnabled = (int)  Microsoft.Office.Interop.Visio.VisDiagramServices.visServiceVersion140;           
                this.axDrawingControl1.Window.Page.InsertObject("{B801CA65-A1FC-11D0-85AD-444553540000}", Microsoft.Office.Interop.Visio.tagVisInsertObjArgs.visInsertAsEmbed);           
                visioapp.Document.DiagramServicesEnabled = DiagramServices;


    Abin

    • 답변으로 표시됨 AbinMatthew 2012년 3월 21일 수요일 오전 8:35
    2012년 3월 21일 수요일 오전 8:35