excel - ActiveX Component can't create object for Outlook VBA -
i trying run macro send email via outlook.
my code looks this:
sub mail_small_text_outlook() 'for tips see: http://www.rondebruin.nl/win/winmail/outlook/tips.htm 'working in office 2000-2013 dim outapp object dim outmail object dim strbody string set outapp = createobject("outlook.application") set outmail = outapp.createitem(0) strbody = "hi there" & vbnewline & vbnewline & _ "this line 1" & vbnewline & _ "this line 2" & vbnewline & _ "this line 3" & vbnewline & _ "this line 4" on error resume next outmail .to = "ron@debruin.nl" .cc = "" .bcc = "" .subject = "this subject line" .body = strbody 'you can add file '.attachments.add ("c:\test.txt") .send 'or use .display end on error goto 0 set outmail = nothing set outapp = nothing end sub at line: set outapp = createobject("outlook.application"), gives error:
runtime error '429': activex component can't create object. i ran line in cmd:
regsvr32 /i "c:\windows\system32\outlvba.dll". then gives me error:
the module "c:\windows\system32\outlvba.dll" failed load. make sure binary stored @ specified path or debug check problems binary or dependent .dll files. specified module not found. need guidance on this.
do have click2run edition of office installed on problematic pc?
the click2run edition of office 2010 doesn't support automation. see office 2010 click-to-run compatibility add-ins more information. may find how to: verify whether outlook click-to-run application on computer article.
see you receive run-time error 429 when automate office applications more information.
Comments
Post a Comment