Inserting a graphic in a Word File using CreateObj

Results 1 to 2 of 2

Thread: Inserting a graphic in a Word File using CreateObj

  1. #1
    Join Date
    Dec 1969

    Default Inserting a graphic in a Word File using CreateObj

    I was wondering if it is possible (of course it&#039;s possible, I just don&#039;t know how to do it) to insert a graphic/figure in a Word File using the CreateObject method?<BR><BR>Here&#039;s a snip of my code to let you see what I&#039;m trying to do:<BR><BR>&#060;%@LANGUAGE=VBScript%&#062;<BR>&#0 60;%Option Explicit%&#062;<BR><BR>&#060;% Dim AlchemyReport<BR><BR>Set AlchemyReport = CreateObject("Word.Document")<BR>AlchemyReport.App lication.Visible = True<BR><BR>AlchemyReport.content.Font.Name = "Arial"<BR>AlchemyReport.content.Font.Size = 11<BR><BR>AlchemyReport.content.InsertAfter "This is a test"<BR><BR>AlchemyReport.SaveAs "C:InetPubwwwroot est est.doc"<BR><BR>AlchemyReport.Close<BR>Set AlchemyReport = Nothing<BR><BR>%&#062;<BR><BR>I need to insert a small gif file above the line that calls out "This is a test."<BR><BR>Any suggestions?

  2. #2
    Join Date
    Dec 1969

    Default From vb word help

    AddPicture Method Example<BR><BR>This example adds a new picture to myDoc. The inserted picture is linked to the file from which it was created and is saved with the document.<BR><BR>Set myDoc = ActiveDocument<BR>ActiveDocument.Shapes.AddPicture _<BR> "C:Program FilesMicrosoft office\" _<BR> & "OfficeBitmapsStylesstone.bmp", _<BR> True, True<BR>

Posting Permissions

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