0

I have an Excel macro that uses SAP for printing data in pdf format. Steps:

  • it access the SAP transaction which provides a table with the necessary information
  • it press Print button (from the Menu Bar of SAP)
  • then Print window appears (from here it is selected Microsoft Print To PDF option and then it is pressed OK button)
  • Save As window appears (complete the path and filename: \S\BC....\outputName)
  • then Save button it is pressed

  • then no error happens

But if I access the path folder "\S\BC....", nothing happen, there is no file saved. BUT, if we look in "Date modified" property of the folder, it is modified in accordance with the last saving time.

Also, I mention that if I'm trying to write the pdf file on local folders, not network shared folders (example: a desktop folder: C:\Users\mariah\Test), macro works.

Also, I mention that user can Read&Write at the shared path \S\BC....\

Please help me to find the cause of this issue.

Sandra Rossi
  • 11,934
  • 5
  • 22
  • 48
Madalina
  • 101
  • 6

2 Answers2

1

A VBA macro only does what you are allowed to do manually. Can you manually save the file in the shared path without the macro?

Is the common path really \S\BC...\ or \ \S\BC...\ ?

Regards, ScriptMan

ScriptMan
  • 1,580
  • 1
  • 9
  • 9
  • Unfortunately, it does not work either manually. But IT WORKS if I save the file on "C:\Users\UserName" and then cut it to shared path "S\BC...". So I've implemented code that saves the file in a path and then copy it to another path and then I deleted it from the first path (such that user never knows that I copy the file in other destination than desired destination). Thank you and best regards! – Madalina Mar 14 '18 at 08:51
  • Many roads lead to Rome. ;-) – ScriptMan Mar 14 '18 at 09:33
  • @Madalina As what you proposed is a solution, please post it as a separate answer. Thank you. (and I will remove the copy I did for helping future visitors) – Sandra Rossi Jan 09 '21 at 09:45
0

Solution proposed by the OP in this comment:

IT WORKS if I save the file on "C:\Users\UserName" and then cut it to shared path "S\BC...". So I've implemented code that saves the file in a path and then copy it to another path and then I deleted it from the first path (such that user never knows that I copy the file in other destination than desired destination).

Sandra Rossi
  • 11,934
  • 5
  • 22
  • 48