Sorry, I am confused. The code line (and note how I am using the code window - its the {i} above post to show code!):
ods rtf file="&NewSharePath.\&rpt_name..rtf" startpage=never;
Is essentially the same as:
ods tagsets.rtf file="&NewSharePath.\&rpt_name..rtf" startpage=no style=test2;
The only difference is the engine behind it. If one can write to that location then the other can. The error you present however is not saying that, it is saying that it cannnot write to a path on c drive. So somewhere in your code either the macro variable newsharepath is not being set correctly, or you still have files open.
First, debug your code by putting:
options mlogic mprint symbolgen;
On, this will show what macro code is generated and what the variables are at given times. Run through it, its likely you will see some oddity. Probably a good idea to start a new session and do this.
If the problem still persists, then write a very simple bit of code and run in a new session to test:
%let newsharepath=...;
ods _all_ close;
ods rtf file="&newsharepath./test1.rtf" startpage=never;
proc print data=sashelp.class;
run;
ods rtf close;
ods tagsets.rtf file="&newsharepath./test2.rtf" startpage=never;
proc print data=sashelp.class;
run;
ods tagsets.rtf close;
This should create both files in that area, so you will be able to know that it is your code and not the system. If that fails, post the full log in a code window.
... View more