Page 2 of 2 FirstFirst 12
Results 16 to 26 of 26
  1. #16
    Super Moderator RetiredGeek's Avatar
    Join Date
    Mar 2004
    Location
    Manning, South Carolina
    Posts
    6,194
    Thanks
    201
    Thanked 784 Times in 718 Posts
    KayPat,

    OOPS! Typo Alert!

    Code:
    ActiveDocument.SaveAs2 _
            FileName:=Chr(34) & zDestDir & "\" & vFileName(0) & ".doc" & Chr(34), _
            FileFormat:=wdFormatDocument
    In the code above I had zSourceDir vs zDestDir...I copied the code then forgot to make the change...Sorry.

    Lastly, all files contain a different image with different paths, how do i solve this issue whilst in the conversion process, as i noticed that it prompts if you wanted to set a path for conversion to complete!!!How can this be done with the macro?
    I'm not exactly sure what this is all about as I don't have files to test with. Do the WP documents contain linked graphics vs imbedded graphics? If so I'm not sure how to handle that in code. You could try this parameter
    Code:
    SaveNativePictureFormat:=True
    in the SaveAs2 command chain, just add it after the Format:=wdFormatDocument and separate with a comma.
    May the Forces of good computing be with you!

    RG

    VBA Rules!

    My Systems: Desktop Specs
    Laptop Specs


  2. #17
    New Lounger
    Join Date
    Dec 2012
    Posts
    17
    Thanks
    2
    Thanked 0 Times in 0 Posts
    You are a genius, that worked PERFECT!
    As for my image, the files include a signature image which are located on a network drive. If each file has different images how do i get the macro to convert, as well as insert these images? (if it can be done

  3. #18
    Super Moderator RetiredGeek's Avatar
    Join Date
    Mar 2004
    Location
    Manning, South Carolina
    Posts
    6,194
    Thanks
    201
    Thanked 784 Times in 718 Posts
    Quote Originally Posted by KayPat View Post
    You are a genius, that worked PERFECT!
    As for my image, the files include a signature image which are located on a network drive. If each file has different images how do i get the macro to convert, as well as insert these images? (if it can be done
    KayPat,

    If the parameter I gave you above didn't solve the problem I'm sorry but I don't have a solution. Maybe someone else here has a solution.
    May the Forces of good computing be with you!

    RG

    VBA Rules!

    My Systems: Desktop Specs
    Laptop Specs


  4. #19
    New Lounger
    Join Date
    Dec 2012
    Posts
    17
    Thanks
    2
    Thanked 0 Times in 0 Posts
    Yes that did not work, hopefully i can get some suggestions! You have helped me tremendously, thanks a BUNCH for your effort!!!

  5. #20
    Super Moderator
    Join Date
    Jan 2001
    Location
    Melbourne, Victoria, Australia
    Posts
    3,515
    Thanks
    3
    Thanked 143 Times in 136 Posts
    If you need help with the linked image then we will need to see some of the converted documents to work out what type of image and file path we are dealing with. Graphics in Word can be floating or inline which can change the required code significantly.

    A separate macro to step through each of the new documents and resolve the links should be doable but without knowing what exactly the problem is.
    Andrew Lockton, Chrysalis Design, Melbourne Australia

  6. #21
    New Lounger
    Join Date
    Dec 2012
    Posts
    17
    Thanks
    2
    Thanked 0 Times in 0 Posts
    This macro works great in word.

    I now need to create a macro in Word Perfect x5, that enables me to save documents 'as' a Word doc. Can this be done? Individually and as a batch conversion?

    I understand that is is very "old school" to have to do this, but its deems absolutely necessary with the files i'm working with!

    I am completely clueless with Word perfect, let alone creating macros in it! Can anyone please help!
    Last edited by KayPat; 2013-01-10 at 13:28.

  7. #22
    New Lounger
    Join Date
    Dec 2012
    Posts
    17
    Thanks
    2
    Thanked 0 Times in 0 Posts

    Conversion using command prompt

    How can i convert these WP X5 file to word using the command prompt and the batch file recursive system???

  8. #23
    Super Moderator
    Join Date
    Jan 2001
    Location
    Melbourne, Victoria, Australia
    Posts
    3,515
    Thanks
    3
    Thanked 143 Times in 136 Posts
    Sorry but I don't know WordPerfect and can't help with creating macros in that package. I don't know if there are many users here who do use WP so perhaps you may need to post your question on another forum which has more members with that skill set.

    In terms of running a batch script from a command prompt, it can be done by adapting the code from RetiredGeek and using VBscript but it would still require Word (running in the background).
    Andrew Lockton, Chrysalis Design, Melbourne Australia

  9. #24
    5 Star Lounger
    Join Date
    Mar 2001
    Location
    New York, NY
    Posts
    860
    Thanks
    0
    Thanked 10 Times in 9 Posts

  10. #25
    New Lounger
    Join Date
    Oct 2013
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts
    This script has worked out really well for me. But I'm beginning to run into an issue with file names that begin with the same word. I see that the Split function drops everything after the first space in the file name.

    My question is, how do you get the converted Word .doc to keep the same file name as the WP file? Would this have to be completely rewritten? As KayPat mentioned, if multiple files have the same first word in the file name, you'll have to go in and change each one.

    Thanks!

  11. #26
    New Lounger
    Join Date
    Oct 2013
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts
    In case anyone is wondering, I added:

    vFileName = Split(zFileToCvt, ".") 'Strip file type

    so that the Split function would stop at the period instead of at the first space delimiter.

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
  •