P
Paul
I have written a word macro that basically merges three
seperate "rtf" reports into one document and then saves as
a word97 document.
I have tried to share it with several colleagues but on
one or two machines it keeps crashing at the save part
with the following error:
"winword.exe. The instruction a t"0X307a29c3" reference
memory at "0x000000020". The memory could not be read."
When you click "OK" Word closes. Any ideas anyone?
This is the body of the macro:
Selection.EndKey Unit:=wdStory
Selection.InsertBreak Type:=wdPageBreak
ChangeFileOpenDirectory "\\UKHBEUDATA05
\BERGMAN_P$\moodys risk advisor\" [THIS FOLDER IS
PERSONALISED FOR EACH DIFFERENT USER]
Selection.InsertFile FileName:="Financial
Assessments.rtf", Range:="", _
ConfirmConversions:=False, Link:=False,
Attachment:=False
Selection.TypeParagraph
Selection.InsertBreak Type:=wdPageBreak
Selection.InsertFile FileName:="Summary Key
Assessments.rtf", Range:="", _
ConfirmConversions:=False, Link:=False,
Attachment:=False
Selection.HomeKey Unit:=wdStory
Dim Message, Title, Default, MyValue
Message = "Enter file name for this document" ' Set
prompt.
Title = "File Name Request" ' Set title.
' Display message, title, and default value.
MyValue = InputBox(Message, Title, Default)
ChangeFileOpenDirectory _
"\\UKHBEUDATA05\BERGMAN_P$\moodys risk advisor\"
ActiveDocument.SaveAs FileName:=MyValue, FileFormat:= _
wdFormatDocument, LockComments:=False,
Password:="", AddToRecentFiles:= _
True, WritePassword:="",
ReadOnlyRecommended:=False, EmbedTrueTypeFonts:= _
False, SaveNativePictureFormat:=False,
SaveFormsData:=False, _
SaveAsAOCELetter:=False [THIS IS WHERE IT CRASHES]
Thanks.
seperate "rtf" reports into one document and then saves as
a word97 document.
I have tried to share it with several colleagues but on
one or two machines it keeps crashing at the save part
with the following error:
"winword.exe. The instruction a t"0X307a29c3" reference
memory at "0x000000020". The memory could not be read."
When you click "OK" Word closes. Any ideas anyone?
This is the body of the macro:
Selection.EndKey Unit:=wdStory
Selection.InsertBreak Type:=wdPageBreak
ChangeFileOpenDirectory "\\UKHBEUDATA05
\BERGMAN_P$\moodys risk advisor\" [THIS FOLDER IS
PERSONALISED FOR EACH DIFFERENT USER]
Selection.InsertFile FileName:="Financial
Assessments.rtf", Range:="", _
ConfirmConversions:=False, Link:=False,
Attachment:=False
Selection.TypeParagraph
Selection.InsertBreak Type:=wdPageBreak
Selection.InsertFile FileName:="Summary Key
Assessments.rtf", Range:="", _
ConfirmConversions:=False, Link:=False,
Attachment:=False
Selection.HomeKey Unit:=wdStory
Dim Message, Title, Default, MyValue
Message = "Enter file name for this document" ' Set
prompt.
Title = "File Name Request" ' Set title.
' Display message, title, and default value.
MyValue = InputBox(Message, Title, Default)
ChangeFileOpenDirectory _
"\\UKHBEUDATA05\BERGMAN_P$\moodys risk advisor\"
ActiveDocument.SaveAs FileName:=MyValue, FileFormat:= _
wdFormatDocument, LockComments:=False,
Password:="", AddToRecentFiles:= _
True, WritePassword:="",
ReadOnlyRecommended:=False, EmbedTrueTypeFonts:= _
False, SaveNativePictureFormat:=False,
SaveFormsData:=False, _
SaveAsAOCELetter:=False [THIS IS WHERE IT CRASHES]
Thanks.