Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Messages - Viking

Pages: [1] 2 3 ... 16
Hi Viking
If you need to insert images to word (without memory stream )then you can try using below codes

Code: [Select]
Selection.InlineShapes.AddPicture FileName:= _"fullPathOftheImage", LinkToFile:=False, _SaveWithDocument:=True

Code: [Select]
objShapes.AddPicture (fullPathOftheImage)   

Thank you, Arshad. That worked.


Could somebody tell me, why it is better to use PutDiagramImageOnClipboard instead of PutDiagramImageToFile? Is it just because of working memory?

I got the half of Geerts example to work in VBA. I do not find an equivalent in VBA for the code below (see also Simons comment). Does anybody know the solution?

MemoryStream imageStream = new MemoryStream(File.ReadAllBytes(filename));
Image diagramImage = Image.FromStream(imageStream);

Many thanks in advance, V.

I identified it. I had to reference mscorlib.dll. Many thanks.


I am trying to use the script above in Word resp. in VBA.

I am new to VBA. I cannot find MemoryStream.

Can somebofy tell me, how I can link MemoryStream to my code resp. which library I have to reference?

Many thanks in advance, V.

Automation Interface, Add-Ins and Tools / Re: Document Bookmarks
« on: January 11, 2018, 09:12:57 pm »
As I understood it this procedure will replace the bookmark in Work by the contents of a generated RTF report.
Is that what you are looking for?

Many thanks, Geert. I am afraid that I did not to see the wood for the trees. I saw something different in the description... :(

Automation Interface, Add-Ins and Tools / Re: Document Bookmarks
« on: January 11, 2018, 07:24:04 pm »
Does anybody have an idea?

Automation Interface, Add-Ins and Tools / Document Bookmarks
« on: December 14, 2017, 06:16:55 am »
Hello together,

I am still working on my small project creating a report with word by replacing GUIDs with artifacts out of EA (see,38932.0.html).

I identified a potential solution called "Document Bookmarks" decribed in

I followed the instructions and got an exception: "Bookmark undefined".

I did not think about the concept behind it before testing the example. Because the example did not work, I wondered, how Word can know that I mean a diagram in EA with this bookmark. Do I have to prepare Word? Do I have to use a special template (the one which I have to insert with "document file to insert")?

Many thanks in advance, V.

Automation Interface, Add-Ins and Tools / Re: GUID of a diagram
« on: December 11, 2017, 08:59:27 pm »
Thank you very much !!! Thanks also to the learners. I am also here to learn  :)

Automation Interface, Add-Ins and Tools / GUID of a diagram
« on: December 09, 2017, 05:15:24 am »
Hello together,

I thought that finding out the GUID of a diagram without using a script is simple. But it is not. The property field is empty. The question has already been asked, but no answer was given:

Could someody give me the answer, please? Many thanks in advance, V.

Do you want to

(1) retrieve a diagram image from EA and use it in Word, or
(2) get an image from Word and put it in EA?

For the first one you can use EA.Repository.PutDiagramImageToFile ()


I want to do (1). Thank you very much for your help.

I wonder if it possible to retrieve a diagram (as a picture) from Word using the Sparx Object Model. I did not find anything but an addin using the clipboard.

It would be could if no installation would be required.

I am quite sure that it exists already.
I am looking for a script (VBScript), that replaces keyword (resp. appropriate search-statements) in MS Word with Sparx EA diagrams.
In other words, I write a document with Word and add keywords, which will be replaced by diagrams out of EA, as soon as I start the script.
Thank you very much in advance for your feedback, V.

General Board / Re: ARIS notation
« on: October 24, 2017, 08:09:32 pm »
Unfortunately, no. It was developed for a customer. But it was quite trivial. You might use the MDG from my tutorial and create your own shapes for <<process>> and what else you need for ARIS. You can do that even with almost no programming skills. Just remember that the shape is within a 100x100 dimension field. q.

For the sake of completeness: EPC EPK shapes are available as a profile under

It does not contain the shape for system landscape modeling.

I am not able to start EA as administrator. So this cannot be the reason.

Nobody has an idea?

Pages: [1] 2 3 ... 16