Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
hello
my boss said that after clicking the button it should be saved to excel but only at desired location.
for example pop up box will open and will ask for desired path for save.
right now my script is this and saving at only d location but now i want a pop up to ask where to save.
:-
SUB EXPORT
set sObject1 = ActiveDocument.GetSheetObject("TB02")
sObject1.Export "D:\MyDoc.csv", ", "
end sub
did you try my code above?
It is asking for the path!!
As long as you enter a valid path the macro will save the csv to the desired path!
SUB EXPORT
ask_safe = Inputbox("Please insert save-path") 'e.g. C:\Users\admin\Desktop\test.csv
msgbox(ask_safe)
set sObject1 = ActiveDocument.GetSheetObject("TB01")
sObject1.Export ask_safe, ", "
end sub
sir is there any option where window is pop up and ask user for path i mean without hard coding this.
like first i want to save in d drive
next time i want to save in e drive
can this be done without hard code part
did you try my code above?
It is asking for the path!!
As long as you enter a valid path the macro will save the csv to the desired path!