Tech
Forums
Jobs
Books
Events
Videos
Conference
Annual Conference
Bcrypt
Ai Conference
Live
More
Interviews
Certification
Training
Career
Members
News
Blogs
Contribute
An Article
A Blog
A Video
An Ebook
An Interview Question
Register
Login
3
Answers
Using directive doesn't work
Ask a question
Ask a question
Upload Source Code:
Select only zip and rar file.
daniel sanders
13y
1.9k
1
Reply
Hey guys,
In my Forms class i have the following "Using" statements:
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using Microsoft.Office.Interop;using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using Microsoft.Office.Interop;
In my class I use the following code:
public void DrawSampleShapeConnection()
{
// get the current draw page
Visio.Page currentPage = VisioPane.Document.Pages[1];
}
But this doesnt work, the compiler gives an error on Visio:
The type or namespace name 'Visio' could not be found (are you missing a using directive or an assembly reference?
I've tried the following and that does work:
public void DrawSampleShapeConnection()
{
// get the current draw page
Microsoft.Office.Interop.Visio.Page currentPage = VisioPane.Document.Pages[1];
}
I don't understand why the compiler won't take my reference.
Any help is very much appreciated.
Kind regards,
Daniel
EDIT: Past code with IE9 is not advised.... Chrome works better
Post
Reset
Cancel
Answers (
3
)
Next Recommended Forum
C# Import Excel - XlWBATemplate.XlWBATWorksheet Error
MSDN