Page 2 of 2 FirstFirst 12
Results 16 to 17 of 17
  1. #16
    Super Moderator
    Join Date
    Dec 2000
    Location
    Salt Lake City, Utah, USA
    Posts
    9,507
    Thanks
    0
    Thanked 4 Times in 4 Posts

    Re: VBA: Insert pic into document (Word 2000)

    Thanks for the reminder & lesson, Sammy. The teacher in ME wants to say to Martin, always Dim the document objects and then Set a reference to them, then thereafter use the object reference rather than ActiveDocument or ThisDocument; it guarantees that the code is operating on the correct document.
    -John ... I float in liquid gardens
    [acronym title="Gday mate!"][/acronym] [acronym title="What up Dude?"][/acronym] UTC -7±DS

  2. #17
    Lounger
    Join Date
    Jan 2004
    Location
    Prague, Czech Republic
    Posts
    41
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: VBA: Insert pic into document (Word 2000)

    Dear Sammy and John,
    well what to say? You've won a loyal "customer" for this forum, if that means something... <img src=/S/smile.gif border=0 alt=smile width=15 height=15>

    just maybe,
    <hr>The teacher in ME wants to say to Martin, always Dim the document objects and then Set a reference to them<hr>
    I care about declarations, here's an excerpt though I am not finished yet, the code is only being born... <img src=/S/compute.gif border=0 alt=compute width=40 height=20>

    <pre>Option Explicit
    Public wrdApp As Object
    Public xlWbk As Workbook, xlSht As Worksheet
    Public xlSEQSht As Worksheet

    Dim strReportPath As String, strOutputPath As String
    Dim strRepName As String, strRepFullName As String
    Dim lngPeriod As Long
    Dim cl As Range, cl2 As Range, clEnd As Range
    Dim strWbkPath As String, strWbkName As String, strShtName As String
    Dim strText As String
    Dim varAnswer As Variant
    Public strRepMonth As String, strRepYear As String
    Dim i As Integer</pre>



    Not too much of Lesczynski, I know.

    Once my ReportGenerator is finished, you're sure to get a copy for free <img src=/S/whisper.gif border=0 alt=whisper width=29 height=17>
    <img src=/S/thankyou.gif border=0 alt=thankyou width=40 height=15>

    Martin
    Regards,
    Martin

Page 2 of 2 FirstFirst 12

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •