opening powerpoint using excel vba on a macintosh -


i have done lot of research on topic, , can't seem find works me. project user fills out excel file data. user presses finish takes excel data , auto populates powerpoint. powerpoint "called "excelusethisone") made , saved in folder (called "powerpoint") on desktop. want excel file open powerpoint, auto populate it, save it, close powerpoint. have working on pc, not mac. here code on opening powerpoint thought work, doesn't:

username = inputbox(prompt:="you name please.", title:="enter name", default:="all lowercase , 1 word") dim strprespath string, strexcelfilepath string, strnewprespath string strprespath = ":users:" & username & ":desktop:powerpoint:excelusesthisone.ppt" filepath = ":users:" & username & ":desktop:powerpoint:newpresentation.ppt" strnewprespath = filepath set opptapp = createobject("powerpoint.application") opptapp.visible = msotrue set opptfile = opptapp.presentations.open(strprespath) 

any great! thank you.

i'm not seem recall mac not use file extensions, try on mac:

strprespath = ":users:" & username & ":desktop:powerpoint:excelusesthisone" 

other possible reason username has been entered incorrectly? think work on mac, instead of input box can try 1 of these options:

strprespath = ":users:" & environ("username") & ":desktop:powerpoint:excelusesthisone" 

or try approach file extension (again, i'm not 100% file extensions not used on mac os).

you may need volume name, e.g.,:

strprespath = "volume_name:users:..."` 

otherwise, can debug checking path of other workbook, should show correct way formulate path string.

good luck!


Comments

Popular posts from this blog

javascript - RequestAnimationFrame not working when exiting fullscreen switching space on Safari -

django - CSRF verification failed. Request aborted. CSRF cookie not set -

jsf - How to ajax update an item in the footer of a PrimeFaces dataTable? -