[x]
Posted via EE Mobile

Search, ask, and monitor your questions on the go with EE Mobile. Visit Experts Exchange from your mobile device and never be out of touch again.

Question
[x]
Attachment Details

Runtime error '-2147467259 (80004005)' in Word Macro

Asked by kdjch in Microsoft Word, VB Script

Tags: Word; Macro; Runtime Error

Hello
I wrote the following macro shown below 18 months ago and it has been used by at least 40 users several times daily ever since. It is saved in one shared template. About one week ago, one user noted that the macro stopped with an error.

Runtime error '-2147467259 (80004005)' on the method "Convert to Shape"  for the Object "InlineShape".

The line where it stops is:  Set PDF_D = DolderD.ConvertToShape

The code is shown below.

Since then, more and more users are experiencing this error, but not all the time. I cannot figure out where to start looking.

Office 2003
Windows XP
Windows Network

Any tips??

Thank you so much!

KDJ

1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
29:
30:
31:
32:
33:
34:
35:
36:
37:
38:
39:
40:
41:
42:
43:
44:
45:
46:
47:
48:
49:
50:
51:
52:
53:
54:
55:
56:
Dim DolderD As Word.InlineShape
    Dim Address As Word.InlineShape
    Dim PDF_D As Word.Shape
    Dim PDF_Address As Word.Shape
    Dim rng As Word.Range
    Dim HD As Word.HeaderFooter
    
'Cursor at beginning of text
    Selection.HomeKey Unit:=wdStory
    
'Set up Header
    With ActiveDocument.Sections(1)
        .PageSetup.DifferentFirstPageHeaderFooter = True
        .PageSetup.HeaderDistance = CentimetersToPoints(4.8)
    End With
    Set HD = ActiveDocument.Sections(1).Headers(wdHeaderFooterFirstPage)
    Set rng = HD.Range
    
'Add DolderD
   Set DolderD = rng.InlineShapes.AddPicture(FileName:= _
    "H:\Hogaroot\Template\Word\Dolder Big D.jpg", LinkToFile:= _
        False, SaveWithDocument:=True)
 
'Format DolderD
    DolderD.Width = CentimetersToPoints(18.62)
    DolderD.Height = CentimetersToPoints(18.91)
    Set PDF_D = DolderD.ConvertToShape
    PDF_D.RelativeHorizontalPosition = _
        wdRelativeHorizontalPositionPage
    PDF_D.RelativeVerticalPosition = _
        wdRelativeVerticalPositionPage
    PDF_D.Left = CentimetersToPoints(1.58)
    PDF_D.Top = CentimetersToPoints(0.61)
 
'Set up Footer
  
    Set HD = ActiveDocument.Sections(1).Footers(wdHeaderFooterFirstPage)
    Set rng = HD.Range
    
'Add Address
    Set Address = rng.InlineShapes.AddPicture(FileName:= _
    "H:\Hogaroot\Template\Word\Dolder Address.jpg", LinkToFile:= _
        False, SaveWithDocument:=True)
        
'Format Address
    Address.Width = CentimetersToPoints(3.53)
    Address.Height = CentimetersToPoints(7.87)
    Set PDF_Address = Address.ConvertToShape
    PDF_Address.RelativeHorizontalPosition = _
        wdRelativeHorizontalPositionPage
    PDF_Address.RelativeVerticalPosition = _
        wdRelativeVerticalPositionPage
    PDF_Address.Left = CentimetersToPoints(16.49)
    PDF_Address.Top = CentimetersToPoints(21.2)
 
End Sub
[+][-]10/29/09 02:38 AM, ID: 25691842Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]10/29/09 03:29 AM, ID: 25692092Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]10/29/09 05:00 AM, ID: 25692628Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]10/29/09 05:28 AM, ID: 25692825Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]10/29/09 09:10 AM, ID: 25695207Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]10/30/09 12:55 AM, ID: 25700820Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]11/02/09 04:39 AM, ID: 25718804Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]11/02/09 12:37 PM, ID: 25723452Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]11/02/09 01:41 PM, ID: 25724063Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]11/03/09 01:15 PM, ID: 25733758Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
 
Loading Advertisement...
20091118-EE-VQP-93 - Hierarchy / EE_QW_3_20080625