+ Reply to Thread
Results 1 to 4 of 4

Office 365 Word Macro Question

  1. #1
    Forum Contributor
    Join Date
    05-05-2004
    MS-Off Ver
    Office 365
    Posts
    651

    Office 365 Word Macro Question

    The macro code below works GREAT in excel as well as in publisher but when I try to run it in Word i get a "runtime error 13 type mismatch error.

    Would anyone please give me a little help here.

    Thank you so much!



    Please Login or Register  to view this content.
    Last edited by sungen99; 01-30-2020 at 10:47 AM. Reason: messed up.

  2. #2
    Forum Expert
    Join Date
    10-06-2017
    Location
    drevni ruchadlo
    MS-Off Ver
    old
    Posts
    2,151

    Re: Office 365 Word Macro Question

    It's because of a bad (undeclared) constant - the "pbFixedFormatTypePDF" constant doesn't come from word.


    Edit:

    If you want to use the same schema in different office programs, then you must explicitly declare all constants that appear in this schema, because each of them has a different value, which is used by the "ExportAsFixedFormat" command.
    Last edited by mjr veverka; 01-30-2020 at 11:42 AM.

  3. #3
    Forum Expert nigelog's Avatar
    Join Date
    12-14-2007
    Location
    Cork, Ireland
    MS-Off Ver
    Office 365 Windows 10
    Posts
    2,286

    Re: Office 365 Word Macro Question

    try
    Please Login or Register  to view this content.

  4. #4
    Forum Expert Arkadi's Avatar
    Join Date
    02-13-2014
    Location
    Smiths Falls, Ontario, Canada
    MS-Off Ver
    Office 365
    Posts
    5,059

    Re: Office 365 Word Macro Question

    The filetype constant is incorrect for word:

    Please Login or Register  to view this content.
    Please help by:

    Marking threads as closed once your issue is resolved. How? The Thread Tools at the top
    Any reputation (*) points appreciated. Not just by me, but by all those helping, so if you found someone's input useful, please take a second to click the * at the bottom left to let them know

    There are 10 kinds of people in this world... those who understand binary, and those who don't.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Replies: 1
    Last Post: 12-18-2016, 11:47 PM
  2. [SOLVED] Sorting Macro From Office 2010 In Office 2003
    By splendidus in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 06-28-2012, 04:55 AM
  3. MS Word Macro. Form Field Reference Question.
    By gunerstahl in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 09-07-2011, 01:39 PM
  4. macro built with Office 2003 not working on Office 2007
    By pako87 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 11-02-2009, 08:12 AM
  5. Macro Question: Copy a word from a column to another automaticly
    By zaptiri in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 11-11-2008, 10:00 PM
  6. [SOLVED] An old question about Office 97 to Office XP upgrades and Bloomberg
    By Echo in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 07-03-2006, 10:10 AM
  7. [SOLVED] How to know if Excel is called by another Office app like Word
    By Balex in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 09-15-2005, 02:05 PM

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