Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 07-28-2015, 12:01 AM
Rose roon Rose roon is offline How to save active document to SharePoint document library Windows 7 64bit How to save active document to SharePoint document library Office 2007
Novice
How to save active document to SharePoint document library
 
Join Date: Jun 2015
Posts: 28
Rose roon is on a distinguished road
Default How to save active document to SharePoint document library

Hi,



I have to save active document to SharePoint document library using VBA.

Appreciate your help.

Thanks & Regards,
Rose
Reply With Quote
  #2  
Old 07-28-2015, 02:02 AM
macropod's Avatar
macropod macropod is offline How to save active document to SharePoint document library Windows 7 64bit How to save active document to SharePoint document library Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 21,956
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

What code have you tried? Have you implemented the process described at: https://msdn.microsoft.com/en-us/lib...or=-2147217396 ?
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
  #3  
Old 08-26-2015, 01:54 AM
Rose roon Rose roon is offline How to save active document to SharePoint document library Windows 7 64bit How to save active document to SharePoint document library Office 2007
Novice
How to save active document to SharePoint document library
 
Join Date: Jun 2015
Posts: 28
Rose roon is on a distinguished road
Default VBA to save xml file to sharepoint document library

Hi,

Need to save xml file to sharepoint document library.
Using below code I can save the xml to shared drive

objDom.Save ServerShare & "\" & Split(ActiveDocument.Name, ".")(0) & ".xml"

How to save in sharepoint document library?
Appreciate your help

Thanks & Regards,
Rose
Reply With Quote
  #4  
Old 08-26-2015, 03:07 AM
macropod's Avatar
macropod macropod is offline How to save active document to SharePoint document library Windows 7 64bit How to save active document to SharePoint document library Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 21,956
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

See my previous reply.

Please don't start new threads for the same question. I've merged both threads.
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
  #5  
Old 08-26-2015, 09:13 PM
Rose roon Rose roon is offline How to save active document to SharePoint document library Windows 7 64bit How to save active document to SharePoint document library Office 2007
Novice
How to save active document to SharePoint document library
 
Join Date: Jun 2015
Posts: 28
Rose roon is on a distinguished road
Default

Hi Paul,

Thanks for your reply.
I am able to save active document to share point document library
I have two task save as Xml and save active document.
I couldn't save xml using same.
Appreciate your help

Regards,
Rose
Reply With Quote
  #6  
Old 08-26-2015, 10:46 PM
macropod's Avatar
macropod macropod is offline How to save active document to SharePoint document library Windows 7 64bit How to save active document to SharePoint document library Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 21,956
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

Does the code you're using save both the doc file and the xml file correctly if you save to a local folder?
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
  #7  
Old 08-26-2015, 10:52 PM
Rose roon Rose roon is offline How to save active document to SharePoint document library Windows 7 64bit How to save active document to SharePoint document library Office 2007
Novice
How to save active document to SharePoint document library
 
Join Date: Jun 2015
Posts: 28
Rose roon is on a distinguished road
Default

Yes Paul, It saves correctly

Regards,
Rose
Reply With Quote
  #8  
Old 08-27-2015, 03:45 AM
macropod's Avatar
macropod macropod is offline How to save active document to SharePoint document library Windows 7 64bit How to save active document to SharePoint document library Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 21,956
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

So, when you use:
objDom.Save ServerShare & "\" & Split(ActiveDocument.Name, ".")(0) & ".xml"
Does anything get saved? I'd be surprised if you got an xml file out if it, though, as simply changing the extension doesn't create an xml file - you'd really need to use the SaveAs2 method and specify the file type. For example:
Code:
objDom.SaveAs2 _
  FileName:=ServerShare & "\" & Split(ActiveDocument.Name, ".")(0) & ".xml", _
  FileFormat:=wdFormatXML, AddToRecentFiles:=False
(assuming the Word XML format is what you want, though true xml files are only plain text files, as we've discussed before, and for which you could just as easily replace wdFormatXML with one of wdFormatText, wdFormatTextLineBreaks, wdFormatDOSText or wdFormatDOSTextLineBreaks).
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
  #9  
Old 09-22-2015, 09:39 PM
Rose roon Rose roon is offline How to save active document to SharePoint document library Windows 7 64bit How to save active document to SharePoint document library Office 2007
Novice
How to save active document to SharePoint document library
 
Join Date: Jun 2015
Posts: 28
Rose roon is on a distinguished road
Default

Hi Paul,

I have three values in word custom document properties.
I need to save this value to sharepoint document library column.
word also saved to sharepoint document library.

redactionRequired = ActiveDocument.CustomDocumentProperties("redaction Required").Value
restrictedAccess = ActiveDocument.CustomDocumentProperties("restricte dAccess").Value
remarks = ActiveDocument.CustomDocumentProperties("remarks") .Value

using VBA is it possible to save this value to sharepoint document library column?

Appreciate your help

Thanks & Regards,
Rose
Reply With Quote
  #10  
Old 09-22-2015, 10:53 PM
macropod's Avatar
macropod macropod is offline How to save active document to SharePoint document library Windows 7 64bit How to save active document to SharePoint document library Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 21,956
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

Hi Rose,

I've never worked with a sharepoint document library, so each time you post a question about them, I'm having to go off and do the same research you could do for yourself. You obviously know how to read CustomDocumentProperties, so all you need to research is how to paste strings into sharepoint document library columns.
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
Reply

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
Save As Macro using first line of document as document name redzan Word VBA 1 01-31-2015 09:24 PM
Uploading a document to SharePoint 2007 by email bremen22 Misc 0 05-28-2014 07:36 AM
How to save active document to SharePoint document library Copying text from another to Active document AlexTeslin Word VBA 1 03-08-2013 09:06 PM
Standard and SharePoint Library Properties Kyron35 Word 0 02-20-2013 10:27 AM
How to save active document to SharePoint document library Order of Folders in Document Library eliz.bell Word 2 04-03-2012 11:49 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 09:00 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2024 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft