Hi,
a click on a command button on a continous form in access is supposed to open a powerpoint document, update a specific field (so overwrite the old value), and then save the powerpoint document. The button triggers the same for word documents, and there I got it to work via this code:
sDocName = "Path + document name"
WrdName = "doc name"
WrdSpPfad = "path"
Set RS = DB.OpenRecordset("Base", dbOpenDynaset)
Set wdAnw = CreateObject("Word.Application")
Set oDoc = wdAnw.Documents.Open(sDocName)
wdAnw.Visible = False
oDoc.FormFields("Text1").Result = Me!ID
oDoc.SaveAs FileName:=WrdSpPfad & WrdName & ".doc"
wdAnw.WindowState = wdWindowStateMinimize
oDoc.Close
wdAnw.Quit True
Set wdDok = Nothing
Set wdAnw = Nothing
Set oDoc = Nothing
On the receiving word doc is a text field ("Text1") which receives the Me.ID field from the access form. I tried now to do the same with powerpoint, but didnīt succeed. Any ideas how this could work?
Thanks a lot for feedback!