Visio Discussions > Deployment

Save Visio drawing with embedded object as a PDF, and have the object clickable

<< < (2/4) > >>

Very cool.
Made however crash my Excel.
Also could not find a way to get the attachment to open on double click.
Still very nice.

My test configuration is Visio 2013 and Excel 2007 32bit.

There are 2 ways to attach file to a pdf file. First one is to attach to document, second one is to attach as comment or annotation. I implemented the first way but second way can be more appropriate for Ken's needs since a comment box can be created and placed on corresponding page of pdf for each embedded files in visio and user can double click to open the attachment.

There are examples in acrobat api on how to create new annotation and set its properties.


--- Quote from: metuemre on February 17, 2017, 09:52:24 AM ---You may think about attaching embedded files to pdf. I attached a sample .vsd file with an embedded excel file.

AttachToPdf macro in the visio exports the embedded excel file to the same path with visio file, then saves the visio file as pdf, then attaches exported excel file to the generated pdf file.

References to Acrobat and Excel are needed in vba.

If the exported excel file is empty, you need to double click on the embedded excel file, then click on visio again to refresh the excel  before running the macro.

More info on adobe acrobat can be found on following links;

--- End quote ---

It's really interesting. Maybe you could share the produced PDF so that we can understand better what the result is?
I could not make the macro run.. it says that "Acrobat.CAcroApp" is not defined. Where this object is coming from?
Do I need to install something (beside Visio and Acrobat Reader)?

Haven't tried, so, excuse the ignorance, but I think it requires Acrobat, not the reader.  That limits applicability, at least for creating the pdf.  It would seem the double click to open Excel is iffy.

2nd, and now for my fuzzy memory, but, when I embed a worksheet into Visio, it's a stand-alone object.  I can distribute without including the Excel file.  That's Ken's 2nd requirement.  This avoids dispatching a myriad of files.

From my perspective, I'd want both capabilities...double click, no attachments.

I think it really comes down to Adobe vs MS and doing it their way.   Hmmm, I feel like singing.   ;D


Yes you do need the Acrobat, not just the reader.
Here's an example of a PDF with attachments on the drawing itself


[0] Message Index

[#] Next page

[*] Previous page

Go to full version