Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us in Bucharest on Sept 18th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
pkelly
Specialist
Specialist

Help with VBScript - Copy File

Hi All...

As part of my QlikView report VBScript, I copy the PDF file created by PDF-Xchange to a new file.

The location of this file varies based on the user...

Examples of the variables used are...

emailOutput             =  \\ukts2k3r2ss1\users$\pkelly\Documents\QlikView Printing.pdf

emailAttachment      =  \\ukts2k3r2ss1\users$\pkelly\Documents\TS10.pdf

When the user clicks the button to output the pdf, I set thses variables - this works okay.

Within my VBScript I want to use these variables...

I have created a vraiable within my script called vo (Output) and va (Attachment).

I pick up the values using...

set vo = ActiveDocument.Variables("emailOutput")

The issue that I am having is with the following section of my script...

objFSO.CopyFile vo , va

I get the following error...

Type mismatch: 'objFSO.CopyFile'

Any assistance greatly appreciated....

Regards

Paul

1 Solution

Accepted Solutions
Not applicable

hi Paul, try

vo = ActiveDocument.Variables("emailOutput").GetContent.String

View solution in original post

2 Replies
Not applicable

hi Paul, try

vo = ActiveDocument.Variables("emailOutput").GetContent.String

pkelly
Specialist
Specialist
Author

Thanks Alex - spot on...