+ Reply to Thread
Results 1 to 3 of 3

File Save as and pasting from clipboard in VBA macro

  1. #1
    Registered User
    Join Date
    02-15-2011
    Location
    India
    MS-Off Ver
    Excel 2003
    Posts
    17

    File Save as and pasting from clipboard in VBA macro

    Hi
    I have the following code which is pasting the same hard coded value every time (Test File.doc) instead of pasting from clipboard, Please help me change the code to pate from clipboard while renaming the file using save as.

    ChangeFileOpenDirectory "C:\Documents and Settings\ssankees\Desktop\"
    ActiveDocument.SaveAs2 FileName:= _
    "Test File.doc", FileFormat:= _
    wdFormatDocument, LockComments:=False, Password:="", AddToRecentFiles:= _
    True, WritePassword:="", ReadOnlyRecommended:=False, EmbedTrueTypeFonts:= _
    False, SaveNativePictureFormat:=False, SaveFormsData:=False, _
    SaveAsAOCELetter:=False, CompatibilityMode:=0

  2. #2
    Forum Expert
    Join Date
    04-22-2013
    Location
    .
    MS-Off Ver
    .
    Posts
    4,418

    Re: File Save as and pasting from clipboard in VBA macro

    I don't believe it is possible (or it is difficult) to get the data that is stored in the clipboard from VBA. Therefore you would need to paste it into a cell and then use that, for example:
    Please Login or Register  to view this content.

  3. #3
    Registered User
    Join Date
    02-15-2011
    Location
    India
    MS-Off Ver
    Excel 2003
    Posts
    17

    Re: File Save as and pasting from clipboard in VBA macro

    Sorry, I din't mention, I am using the Macro in MS word.

+ 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. [SOLVED] Pasting range from clipboard
    By mattmania in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 07-04-2013, 09:20 AM
  2. Macro: Closing an open file and clearing clipboard
    By plunkettyplunk in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 06-11-2010, 04:10 AM
  3. Need 'save clipboard' property of 'Open file' function.
    By alsameer in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 06-04-2005, 08:05 AM
  4. VBA Bloomberg, Clipboard Pasting Problem
    By Teiresias in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 03-19-2005, 06:32 AM
  5. Pasting from Excel Clipboard with VBA Macro
    By ExcelPeter218 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 02-09-2005, 11:06 PM

Tags for this Thread

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