I have not taken VBA for 10 years and am very rusty. I am not sure if this is possible, but I figure I would ask.
I am trying to write a macro in excel that does 3 things.
1. Opens a word file C:\Users\xxxx\Desktop\test.docx
2. Does a save as, and saves the file as a pdf in word.
If I can make this so it an easy programmable location that would be awesome.
3. It then closes the word without saving it.
If anyone knows please let me know if this is possible and example code would be great.
I have written it so it opens the file so far.
Code is posted below
Set wordapp = CreateObject("word.Application")
wordapp.documents.Open "C:\Users\xxxx\Desktop\test.docx"
wordapp.Visible = True
I am trying to write a macro in excel that does 3 things.
1. Opens a word file C:\Users\xxxx\Desktop\test.docx
2. Does a save as, and saves the file as a pdf in word.
If I can make this so it an easy programmable location that would be awesome.
3. It then closes the word without saving it.
If anyone knows please let me know if this is possible and example code would be great.
I have written it so it opens the file so far.
Code is posted below
Set wordapp = CreateObject("word.Application")
wordapp.documents.Open "C:\Users\xxxx\Desktop\test.docx"
wordapp.Visible = True