Replace method in .oft template

Also I just have it opening the oft file in a folder directly off of the c drive under folder 1. So C:\1\test.oft

So just make sure the file is located there and you should be good to go.
 
Even after "refreshing" the reference the error still occurs, it was the Microsoft outlook 12.0 object library correct?
 
Just placed it in the same filepath as you had, still the same error.
 
hrmmm Yes that is correct. That's really weird because it works just fine on my system here. I just call the function from the debug window and then it asks which account I want to use. Finally it prompts me asking if I want to give my program access to outlook and I specify a time limit. Then the email is created.

Does your's do all those prior steps?
 
Well mine never asks for an account or permission, it jus opens the new email if the replace string isn't there, but the email won't generate because of this error.
 
I dont know what to tell you at this point. Maybe try running it on a different computer and see if maybe this whole problem was because of a office file problem on that machine... Gotta think a little while on this very weird
 
I am still unable to get .send to work... Even with the recommended changes.
 
Have you tried it on another computer yet? It would be ideal at this point instead of beating it to death. Also that is correct because it's pretty much saying that it cannot create the email with the oft template and therfore cannot send or do anything with it either. I am really thinking that their must be a problem with the outlook library on your specific computer but we won't know for sure until you try it on something else.
 
I've tried two others with the same result. However these are DoD computers and I've read that outlook might be blocking me from directly sending emails. I've used the sendobject before and it's worked fine by automatically sending emails though so I'm not sure why this would be any different..
 
I understand as I am on DoD as well. I cannot automatically send but it should produce the email so you can see it at least and with the template with the replaced words from the code.
 

Users who are viewing this thread

Back
Top Bottom