+ Reply to Thread
Results 1 to 8 of 8

Problem in insering header picture in word through excel

  1. #1
    Registered User
    Join Date
    10-19-2012
    Location
    chennai, india
    MS-Off Ver
    Excel 2007
    Posts
    4

    Arrow Problem in insering header picture in word through excel

    Hi friends,

    I am Prem, new to this VBA world. I was writing a program to generate the excel contents to word. it worked fine for me. now i tried to insert a header (a picture) in the word. i am getting a run time error "5941" ,"The requested member of the collection does not exit". When i checked the help option, the message was "Cannot open the file mk:@MSIT store c:\program file\Microsoft office\office 12\1033\WDMAIN11.CHM". But if i don't include that line for the header, it is working good.

    doc.sections(1).headers(wdheaderfooterprimary).range.inlineshape.addpicture "c:\documents and setting\pic.bmp". Request you to help to find the solution.

    Thank you

    Prem

  2. #2
    Forum Contributor stojko89's Avatar
    Join Date
    05-18-2009
    Location
    Maribor, Slovenia
    MS-Off Ver
    MS Office 365
    Posts
    913

    Re: Problem in insering header picture in word through excel

    Why don't you just have the picture already in the header of the word template?

  3. #3
    Registered User
    Join Date
    10-19-2012
    Location
    chennai, india
    MS-Off Ver
    Excel 2007
    Posts
    4

    Re: Problem in insering header picture in word through excel

    hi

    Thanks for the reply,

    But each time i am opening a new doc, so having header before in the template will not work in this case.

  4. #4
    Forum Contributor stojko89's Avatar
    Join Date
    05-18-2009
    Location
    Maribor, Slovenia
    MS-Off Ver
    MS Office 365
    Posts
    913

    Re: Problem in insering header picture in word through excel

    Why not?
    If you set a template document and use.
    Please Login or Register  to view this content.
    If you use .Add you open a new document with the header and document looking as you wish.
    If you use .Open then you open the new document file but if its a template you will be asked where to have it saved and so on. If its a document docx then you'll over write the document when you save it.

  5. #5
    Registered User
    Join Date
    10-19-2012
    Location
    chennai, india
    MS-Off Ver
    Excel 2007
    Posts
    4

    Thumbs up Re: Problem in insering header picture in word through excel

    hi...

    Thank you v much for the help.. i did as you said, it is working fine now.. Thanks a lot...

  6. #6
    Forum Expert Cutter's Avatar
    Join Date
    05-24-2004
    Location
    Ontario,Canada
    MS-Off Ver
    Excel 2010
    Posts
    6,451

    Re: Problem in insering header picture in word through excel

    @ spmltr

    Welcome to the forum.

    Based on your last post it seems that you are satisfied with the solution(s) you've received but you haven't marked your thread as SOLVED. I'll do that for you now but please keep in mind for your future threads that Rule #9 requires you to do that yourself. If your problem has not been solved you can use Thread Tools (located above your first post) and choose "Mark this thread as unsolved".
    Thanks.

    Also, as a new member of the forum, you may not be aware that you can thank those who have helped you by clicking the small star icon located in the lower left corner of the post in which the help was given. By doing so you can add to the reputation(s) of those who helped.

  7. #7
    Forum Contributor stojko89's Avatar
    Join Date
    05-18-2009
    Location
    Maribor, Slovenia
    MS-Off Ver
    MS Office 365
    Posts
    913

    Re: Problem in insering header picture in word through excel

    No problem!
    And like Cutter said. Always mark post as [SOLVED] when you get your answer, as it is requested in the forum rules

  8. #8
    Registered User
    Join Date
    10-19-2012
    Location
    chennai, india
    MS-Off Ver
    Excel 2007
    Posts
    4

    Re: Problem in insering header picture in word through excel

    Ya sure.. Thanks for telling me...

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1