Extracting Text From Visio Documents

VISIO

    Sponsored Links

    Next

  • 1. how to convert to 3d ?
    once i completed my floor plan, can i convert the drawing to 3d drawing?
  • 2. Visio 2003 sp1 diagram saved as SVG document
    Hi, I need to save diagrams as SVG-documents. When I save the diagram, the size of the SVG-document will be much larger than the actual diagram, meaning that I get a lot of white-space around the diagram, when I in turn use it on a web-page. What can I do to save only what is in the diagram, and nothing else? Cheers, Stigur
  • 3. resources
    where can i find resource for how to extend visio? i need to add new stencil with my shapes that will have code behind it. TIA.
  • 4. Visio vml output problem
    Hi I have succesfully used visio to create a wonderful great looking interactive presentation. I have saved my visio project as html and I have changed the publish settings to output the document with a pan and zoom frame to the left of the screen. My Hyperlinks do not work. If I change my output from vml to a different format and do not include pan and zoom the page references are all good and the hyperlinks work. I want the pan and zoom though so need to solve this. Another thing in the working version, (No pan and zoom though), in my tooltip popups over the hyperlinks I get the message "click to follow hyperlink..." Is it possible to change this to popup with the description as it does in visio. Thanks for your help. Rob
  • 5. What version is Visio for VS 2003 Enterprise Architect?
    Message put up on MS Visio Forum web site: Subject: What version is Visio for VS 2003 Enterprise Architect? We use Windows XP and have Office XP (but the ver of Visio could be later as it was installed separately.). We are assuming we have Visio 2003, but MS does not tell us the year, only the numbers below. We had Visio installed by our company, Help About only shows 10.0.525, and we got VS.NET Enterprise Architect, with Visio (the ver says 10.0.2705). Now, we cannot open charts created by others in the 10.0.525. Wouldn't our VS.NET 2003 Visio be later than the other version? As I mentioned I do not know the "year" version of either copy, since help does not tell me. I can't get a service pack download determined, because you have to go into Office help as 2000, 2002, 2003, Office XP, type of things. Why can't we open the chart? What are the correct "year" versions of the above numbers? Thanks. -- MichaelM

Extracting Text From Visio Documents

Postby QmlnZ2Fmb3Jk » Fri, 21 Nov 2008 02:00:00 GMT

How can I extract the text from shapes within a Visio document.  After 
getting the text i write it out to a text file.

Using Visio Professional 2003.

Re: Extracting Text From Visio Documents

Postby Paul Herber » Fri, 21 Nov 2008 02:11:20 GMT

On Wed, 19 Nov 2008 09:00:00 -0800, Biggaford




I have a utility that will do that for you, including all the text
within grouped shapes and text fields.
Details below.


-- 
Regards, Paul Herber, Sandrila Ltd. 
Visio Utilities            http://www.**--****.com/ 

Re: Extracting Text From Visio Documents

Postby QmlnZ2Fmb3Jk » Fri, 21 Nov 2008 03:27:02 GMT







Very nice tool; however I am automating visio and need to do the text 
extraction from shapes programatically. my options, loop through the shapes 
collection and get the text; but a problem arises with protected and and or 
grouped shapes.

Is there another method, such as using xml; converting the visio document to 
xml then read appropriate tags.
thank you for your response. 

Re: Extracting Text From Visio Documents

Postby John... Visio MVP » Fri, 21 Nov 2008 10:43:51 GMT








If you are extracting through code, the protection should not be a problem. 
The protection is there to prevent tampering of the shape through the UI.

As to the Group shapes, you need to use recursion to access all the 
elements.

John... Visio mVP 


Re: Extracting Text From Visio Documents

Postby David Parker » Fri, 21 Nov 2008 16:48:11 GMT

Of course, the Reports addin can output shape and sub-shape text (within a 
group) out to an XML file.

If you are doing your own code, then do not forget to extract the 
shape.Characters.Text rather than the shape.Text













Re: Extracting Text From Visio Documents

Postby John... Visio MVP » Sat, 22 Nov 2008 05:03:14 GMT





Sounds like a good topic for a blog. Even I have trouble playing with text.

John... Visio MVP


Re: Extracting Text From Visio Documents

Postby Paul Herber » Sat, 22 Nov 2008 20:09:29 GMT

n Wed, 19 Nov 2008 10:27:02 -0800, Biggaford
< XXXX@XXXXX.COM > wrote:


I'll donate some code for this, it's in Delphi so if you want it in C#
or VBA it should be very easy to translate.

======

unit TextExport;

interface

procedure doDocTextExport();
procedure doPageTextExport();
procedure doSelectionTextExport();

implementation

uses DAVSL, DAVAO, Classes, Forms, Controls, SysUtils,,
Visio_TLB, Math, SyntaxCheckOutput, Utils, Dialogs;

const pageTextExport = 0;
const docTextExport = 1;
const selectionTextExport = 2;

//------------------------------------------------------
procedure doTextExport(mode: integer);
//------------------------------------------------------
var
docObj: Visio_TLB.Document;
pagObj: Visio_TLB.Page;
shpsObj: Visio_TLB.Shapes;
shpObj: Visio_TLB.Shape;
SymbolListDlg: TOutputDlg;
pageCounter: integer;
shapeCounter: integer;

procedure doShapeText(theShape: Visio_TLB.Shape);
var
theText: wideString;
groupedShapeCounter: integer;
groupShape: Visio_TLB.Shape;
begin
theText := theShape.Characters.TextAsString;
if (theText <> '') then
begin
SymbolListDlg.OutputMemo.Lines.Add(theText);
end;
if (theShape.Shapes.Count > 0) then
begin
for groupedShapeCounter := 1 to theShape.Shapes.Count do
begin
groupShape := theShape.Shapes.Item[groupedShapeCounter];
doShapeText(groupShape); // recurse down groups of shapes
end;
end;
end;

begin
// Create memo
SymbolListDlg := TOutputDlg.Create(Forms.Application);
SymbolListDlg.Show;
SymbolListDlg.Caption := 'Text Export';
SymbolListDlg.OutputMemo.Lines.Clear;
SymbolListDlg.BringToFront;
SymbolListDlg.OutputCloseBtn.Visible := false;
SymbolListDlg.OutputSaveTextBtn.Visible := false;
SymbolListDlg.StopButton.Visible := true;
try
if (mode = docTextExport) then
begin
docObj := VSL.visApp.ActiveDocument;
for pageCounter := 1 to docObj.Pages.Count do
begin
pagObj := docObj.Pages.ItemU[pageCounter];
shpsObj := pagObj.Shapes;
if (shpsObj.Count > 0) then
begin
for shapeCounter := 1 to shpsObj.Count do
begin
try
shpObj := shpsObj.ItemU[shapeCounter];
doShapeText(shpObj);
except
end;
end;
end;
end;
end
else if (mode = pageTextExport) then
begin
pagObj := VSL.visApp.ActivePage;
shpsObj := pagObj.Shapes;
if (shpsObj.Count > 0) then
begin
for shapeCounter := 1 to shpsObj.Count do
begin
try
shpObj := shpsObj.ItemU[shapeCounter];
doShapeText(shpObj);
except
end;
end;
end;
end
else if (mode = selectionTextExport) then
begin
if (VSL.visApp.ActiveWindow.Selection.Count > 0) then
begin
for shapeCounter := 1 to
VSL.visApp.ActiveWindow.Selection.Count do
begin
try
shpObj :=
VSL.visApp.ActiveWindow.Selection.Item[shapeCounter];
doShapeText(shpObj);
except
end;
end;
end
else
SymbolListDlg.OutputMemo.Lines.Add('No shapes selected.');
end;
finally
SymbolListDlg.OutputCloseBtn.Visible := true;
SymbolListDlg.OutputSaveTextBt

Similar Threads:

1.Extract Text from Visio

I need to extract text by using Visio IFilter.

Actually, I am using Visio IFilter and it works when I manually install 
Visio IFilter component before/after install my application.

But I don't need my users to install application 2 times, one for my 
application, another is visio ifilter.

I need to install only my application for one times and register some dll 
which visio used.

How can I do?

Or any recommended library to extract text from Visio?


2.Extract the text from a Shape using Code

I have created a procedure to generate shapes with  text from a recordset. I 
want to reference the text in a shape on the page I execute the code from, 
to use as a variable when I create the recordset SQ at runtime. What is the 
correct syntax to reference the shape object and the text it contains? 
Thanks

-- 
Mike


3.How can I extract the text from a viso document?

I just want the text that is displayed in the visio document, any suggestions 
welcome.

4.visio document text boxes in powerpoint

I have a visio document with text boxes that will not 
print in the powerpoint document.  It views in preview 
but not- it prints the timeline and lines, no text --What 
do I need to set to get the text to print?

Thank You

5.Not able to edit shape content text in visio document

Hi,

I am creating all pages and text shapes in run time using VBA.
I am able to see all pages and text shape content, but if I try to edit that 
shape text by double clicking old text is getting disappeared and blank 
editable shape is displaying.

If I save that document and open with out enabling macros, it works fine.


Please could you help me what may be the reason.

Thanks,
Kota.

6. generating visio documents from text files

7. Visio text won't print in word document

8. Extracting Service Pack 2 for Visio 2003



Return to VISIO

 

Who is online

Users browsing this forum: No registered users and 84 guest