A Microsoft Outlook email forum. Outlook Banter

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » Outlook Banter forum » Microsoft Outlook Email Newsgroups » Outlook and VBA
Site Map Home Register Authors List Search Today's Posts Mark Forums Read Web Partners

Word macro running from OL VBA throwing error on Word SaveAs??



 
 
Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1  
Old March 2nd 10, 04:23 PM posted to microsoft.public.word.vba.general,microsoft.public.outlook.program_vba
Ed from AZ
external usenet poster
 
Posts: 6
Default Word macro running from OL VBA throwing error on Word SaveAs??

I have a macro in Word that iterates through my Favorites folder and
saves everything out as hyperlinks in a Word doc. I then SaveAs using
doc.SaveAs FileName:= _
"C:\Documents and Settings\edward.millis\Documents\MyFaves.htm",
_
FileFormat:=wdFormatHTML

This macro was written in Word XP, which has now been upgraded to
2007. The OS has also been updated from WinXP Pro to Vista Pro.

When I run the macro in Word only, it runs fine - the file is
generated and saved to the correct folder in the correct format.

I want to email the file out, so I am trying to run it from within an
Outlook 2007 macro. (Security settings prevent Word VBA from
accessing OL VBA, or I would do it all from within Word.)

The OL macro creates the Word instance just fine and runs the macro
just fine - until it hits the SaveAs. I put a STOP in the Word code
just before the SaveAs to verify this - as soon aas I F8 to the
SaveAs, my error handler tells me that Outlook VBA has the following
error:
-2147417851
Method "Run" of object "Application" failed

Any suggestions on getting this macro to run when accessed from OL
VBA?
Ed
 




Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Specify Font Name or Face using VBA Macro in Word JBark Outlook and VBA 2 July 6th 09 03:16 PM
Word 2007 freezes on startup—“Running virus scan” in status bar [email protected] Outlook - General Queries 0 July 9th 08 03:28 PM
Word macro warning goran Outlook and VBA 1 December 21st 07 09:44 AM
Outlook macro abends but Word macro runs successfully Jreue Outlook and VBA 0 December 13th 06 11:55 PM
Macro to search for word Dave Neve Outlook and VBA 7 July 26th 06 09:52 PM


All times are GMT +1. The time now is 12:49 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.Search Engine Friendly URLs by vBSEO 2.4.0
Copyright ©2004-2025 Outlook Banter.
The comments are property of their posters.