Hello gyus,
I am trying to develop smart excel chart, where user can attach file.
For attaching files I am using button with this simple code:
This code works pretty well if user attach everything except of PDF file. The tricky part comes when user wants to embed pdf file, I find out it's because users are using different pdf viewers. If user us using Foxit as default PDF viewer, everything is OK.
In the case the user is using Adobe Reader I started to have some issues. So I created second button with code.
This code works pretty well when you attach PDF for the first time. Since I didn't define Adobe Reader version it is not sensitive on version of Adobe Reader. Clicking on the attached file you can open the file in the Adobe Viewer. Unfortunately, when you save the excel file with attached pdf, open it again and then try to open attached PDF file then the Adobe Reader breaks down and nothing is open.
I try to used classtype:="Package" instead of AcroExch.Document but it's not working at all, since it's giving me run time error 1004.
Also, I changed the enhanced security setting in Adobe Reader.
Does anybody have similar problem like me? I did research on google, but I didn't find anything helpful at all.
Thank you in advance for any response!
Mark</code>
I am trying to develop smart excel chart, where user can attach file.
For attaching files I am using button with this simple code:
Code:
<code style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: Consolas, Menlo, Monaco, "Lucida Console", "Liberation Mono", "DejaVu Sans Mono", "Bitstream Vera Sans Mono", "Courier New", monospace, sans-serif; vertical-align: baseline; white-space: inherit;">[COLOR=#303336][FONT=inherit]ftopen [/FONT][/COLOR][COLOR=#303336][FONT=inherit]=[/FONT][/COLOR][COLOR=#303336][FONT=inherit] Application[/FONT][/COLOR][COLOR=#303336][FONT=inherit].[/FONT][/COLOR][COLOR=#303336][FONT=inherit]GetOpenFilename[/FONT][/COLOR][COLOR=#303336][FONT=inherit]([/FONT][/COLOR][COLOR=#303336][FONT=inherit]Title[/FONT][/COLOR][COLOR=#303336][FONT=inherit]:=[/FONT][/COLOR][COLOR=#7D2727][FONT=inherit]"Choose file to attach"[/FONT][/COLOR][COLOR=#303336][FONT=inherit])
[/FONT][/COLOR][COLOR=#303336][FONT=inherit]
<code style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: Consolas, Menlo, Monaco, "Lucida Console", "Liberation Mono", "DejaVu Sans Mono", "Bitstream Vera Sans Mono", "Courier New", monospace, sans-serif; vertical-align: baseline; white-space: inherit;">[COLOR=#303336][FONT=inherit]ActiveSheet[/FONT][/COLOR][COLOR=#303336][FONT=inherit].[/FONT][/COLOR][COLOR=#303336][FONT=inherit]OLEObjects[/FONT][/COLOR][COLOR=#303336][FONT=inherit].[/FONT][/COLOR][COLOR=#303336][FONT=inherit]Add[/FONT][/COLOR][COLOR=#303336][FONT=inherit]([/FONT][/COLOR][COLOR=#303336][FONT=inherit]Filename[/FONT][/COLOR][COLOR=#303336][FONT=inherit]:=[/FONT][/COLOR][COLOR=#303336][FONT=inherit]ftopen[/FONT][/COLOR][COLOR=#303336][FONT=inherit],[/FONT][/COLOR][COLOR=#303336][FONT=inherit] Link[/FONT][/COLOR][COLOR=#303336][FONT=inherit]:=[/FONT][/COLOR][COLOR=#7D2727][FONT=inherit]False[/FONT][/COLOR][COLOR=#303336][FONT=inherit],[/FONT][/COLOR][COLOR=#303336][FONT=inherit] _
DisplayAsIcon[/FONT][/COLOR][COLOR=#303336][FONT=inherit]:=[/FONT][/COLOR][COLOR=#7D2727][FONT=inherit]False[/FONT][/COLOR][COLOR=#303336][FONT=inherit]).[/FONT][/COLOR][COLOR=#303336][FONT=inherit]Activate[/FONT][/COLOR]</code>[/FONT][/COLOR]
This code works pretty well if user attach everything except of PDF file. The tricky part comes when user wants to embed pdf file, I find out it's because users are using different pdf viewers. If user us using Foxit as default PDF viewer, everything is OK.
In the case the user is using Adobe Reader I started to have some issues. So I created second button with code.
Code:
<code style="font-size: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; white-space: inherit; margin: 0px; padding: 0px; border: 0px; font-stretch: inherit; line-height: inherit; font-family: Consolas, Menlo, Monaco, "Lucida Console", "Liberation Mono", "DejaVu Sans Mono", "Bitstream Vera Sans Mono", "Courier New", monospace, sans-serif; vertical-align: baseline;">[COLOR=#303336][FONT=inherit]ActiveSheet[/FONT][/COLOR][COLOR=#303336][FONT=inherit].[/FONT][/COLOR][COLOR=#303336][FONT=inherit]OLEObjects[/FONT][/COLOR][COLOR=#303336][FONT=inherit].[/FONT][/COLOR][COLOR=#303336][FONT=inherit]Add[/FONT][/COLOR][COLOR=#303336][FONT=inherit]([/FONT][/COLOR]</code>classtype:="AcroExch.Document" Link[COLOR=#303336][FONT=inherit]:=[/FONT][/COLOR][COLOR=#7D2727][FONT=inherit]False[/FONT][/COLOR][COLOR=#303336][FONT=inherit], [/FONT][/COLOR]<code style="font-size: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; white-space: inherit; margin: 0px; padding: 0px; border: 0px; font-stretch: inherit; line-height: inherit; font-family: Consolas, Menlo, Monaco, "Lucida Console", "Liberation Mono", "DejaVu Sans Mono", "Bitstream Vera Sans Mono", "Courier New", monospace, sans-serif; vertical-align: baseline;">[COLOR=#303336][FONT=inherit]DisplayAsIcon[/FONT][/COLOR][COLOR=#303336][FONT=inherit]:=[/FONT][/COLOR][COLOR=#7D2727][FONT=inherit]False[/FONT][/COLOR][COLOR=#303336][FONT=inherit]).[/FONT][/COLOR][COLOR=#303336][FONT=inherit]Activate[/FONT][/COLOR]</code>
This code works pretty well when you attach PDF for the first time. Since I didn't define Adobe Reader version it is not sensitive on version of Adobe Reader. Clicking on the attached file you can open the file in the Adobe Viewer. Unfortunately, when you save the excel file with attached pdf, open it again and then try to open attached PDF file then the Adobe Reader breaks down and nothing is open.
I try to used classtype:="Package" instead of AcroExch.Document but it's not working at all, since it's giving me run time error 1004.
Also, I changed the enhanced security setting in Adobe Reader.
Does anybody have similar problem like me? I did research on google, but I didn't find anything helpful at all.
Thank you in advance for any response!
Mark</code>